Grid with mulitple (more columns)

Aug 12, 2015 at 11:31 AM
Hello,

I am using "Html.Awe().Grid()" where there are total 16 columns. Out of which 6 are having predefined width.

When loading grid before rows data get rendered width of grid is responsive which does not shows any horizontal scroll bar. however once the data is loaded it shows horizontal scroll bar and grid width increases. I am expecting to have same width as it had before data gets loaded.

Any option or property which will fix the max-width of grid to 100% of the screen or container size?

I do have option to show/hide columns so there will not be a problem of having more columns at a time.

Please suggest in case of any alternate approach
Aug 12, 2015 at 12:54 PM
Edited Aug 12, 2015 at 12:58 PM
there is Settings.Grid.ColumnWidth = 140 by default,
and this plus the defined&resized width of other columns is used to calculate the grid internal container width

you could set Hidden = true on certain columns
or just set .ColumnsPersistence(Persistence.Local) presuming that the user will hide columns on the first time use
Aug 12, 2015 at 1:21 PM
Thanks for your reply,

However i want grid's width same as it was before rendering the data. Grid's width should not increase after rendering the grid data.

Any other approach than listed above?
Aug 12, 2015 at 1:58 PM
try changing Settings.Grid.ColumnWidth
Aug 12, 2015 at 3:55 PM
the grid also has .ColumnWidth(value) extension which is the same as the setting except per grid, not global
so try something like Html.Awe().Grid("Grid1").ColumnWidth(100)...
Aug 13, 2015 at 5:28 AM
Thanks for your suggestions,

I have used grid extension method and it looks like i have got proper results after applying it.

Once again thanks a lot for your support.