Hi,
I am using the GridSettingsPersister with AutoLoad of the contents.
I want grid settings to work this way for the user.
1. 1rst time: The user's default settings are loaded.
2. If the user has changed his settings (from his defaults), leaves the page and returns, his last settings should be in effect
3. The user can always save or load his settings for the grid.
Having tried all(?) the server site grid events ( "ColumnCreated" looks like the one to use - rewrote the GridSettingsPersister to get values pr. column HeaderText for this), I cannot get the column order to take effect - column width is set ok but the order setting only take effect when I explicitly Ajax load the saved settings and then the order only takes effect after I make another Ajax call that changes the contents of the grid. For 1. and 2. above , Ajax is not used (intial load of the page) but the order never takes effect.
The Debugger shows the right order values being set - the correct order is just not shown on the screen.
Is this there a way around this or is this intrinsinct to the design when using autoload?
(If you read the original GridSettingPerister author's comments, he also states that he could not get it to work with autoloaded contents, but suggested trying ColumnCreated)
EnableViewState fale or true has no effect on this.
Correction:
Adding his to _PreRender makes the Ajax Loading of usersettings happen at once, the rest is the same:
Best Regards
Gunnar Skogen
I am using the GridSettingsPersister with AutoLoad of the contents.
I want grid settings to work this way for the user.
1. 1rst time: The user's default settings are loaded.
2. If the user has changed his settings (from his defaults), leaves the page and returns, his last settings should be in effect
3. The user can always save or load his settings for the grid.
Having tried all(?) the server site grid events ( "ColumnCreated" looks like the one to use - rewrote the GridSettingsPersister to get values pr. column HeaderText for this), I cannot get the column order to take effect - column width is set ok but the order setting only take effect when I explicitly Ajax load the saved settings and then the order only takes effect after I make another Ajax call that changes the contents of the grid. For 1. and 2. above , Ajax is not used (intial load of the page) but the order never takes effect.
The Debugger shows the right order values being set - the correct order is just not shown on the screen.
Is this there a way around this or is this intrinsinct to the design when using autoload?
(If you read the original GridSettingPerister author's comments, he also states that he could not get it to work with autoloaded contents, but suggested trying ColumnCreated)
EnableViewState fale or true has no effect on this.
Correction:
Adding his to _PreRender makes the Ajax Loading of usersettings happen at once, the rest is the same:
SupportItemGrid1.DataSource =
null;
SupportItemGrid1.Rebind();
Best Regards
Gunnar Skogen