Skip to content

Commit

Permalink
update editgridviews
Browse files Browse the repository at this point in the history
  • Loading branch information
ispysoftware authored and elyakimw committed May 15, 2022
1 parent c819f12 commit 7091c46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Server/LocalServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2461,11 +2461,14 @@ private string DoCommand(string sRequest, int otid, string resp, string cmd, int
var cids = GetVar(sRequest, "ids").Split(',').Where(x => int.TryParse(x, out _)).Select(int.Parse).ToList();
int ind = Convert.ToInt32(index);
var cg = MainForm.Conf.GridViews.ToList()[ind];
int cols = cg.Columns;
int rows = cg.Rows;

int cols = Convert.ToInt32(Math.Ceiling(Math.Sqrt(cids.Count())));
int rows = Convert.ToInt32(Math.Ceiling(cids.Count() / Convert.ToDouble(cols)));

if (cg != null)
{
cg.Columns = cols;
cg.Rows = rows;
var gi = new List<configurationGridGridItem>();
int j = 0;
foreach(var id in cids)
Expand Down

0 comments on commit 7091c46

Please sign in to comment.