Hi all
I have a very wide grid, I am using Header Context Menu to Hide/Show the columns then I save the settings of the grid using GridSettingsPersister mentioned in the help.
My problem is that when I hide columns, save settings, and on the next time I load the settings and apply it on the grid, then I show some hidden columns(using header context menu, the grid does not resize, instead, with width of the other columns decreased. I used: TableLayout="Fixed", but It did not work. The width of the grid and master MasterTableView is calculated on GridSettingsPersister as follows:
Settings the width to 100% does not fix the issue, also leaving it empty.
I have a very wide grid, I am using Header Context Menu to Hide/Show the columns then I save the settings of the grid using GridSettingsPersister mentioned in the help.
My problem is that when I hide columns, save settings, and on the next time I load the settings and apply it on the grid, then I show some hidden columns(using header context menu, the grid does not resize, instead, with width of the other columns decreased. I used: TableLayout="Fixed", but It did not work. The width of the grid and master MasterTableView is calculated on GridSettingsPersister as follows:
double totalWidth = 0; | |
foreach (GridColumn column in gridInstance.MasterTableView.Columns) | |
{ | |
Triplet triplet = new Triplet(); | |
triplet = dict[column.UniqueName]; | |
Unit width = (Unit)triplet.Second; | |
column.OrderIndex = (int)triplet.First; | |
column.HeaderStyle.Width = width; | |
column.Display = (bool)triplet.Third; | |
if((bool)triplet.Third) | |
totalWidth += width.Value; | |
} | |
gridInstance.Width = Unit.Percentage(totalWidth); | |
gridInstance.MasterTableView.Width = Unit.Percentage(totalWidth); |
Settings the width to 100% does not fix the issue, also leaving it empty.