My application contains hundreds of UltraWebGrids that need to be converted in order to stay current. I am converting the first grids in order to set an example for others to follow. I am finding it difficult to know how to use the properties of EnableAjax, EnableAjaxViewState, EnableDataViewState and EnableViewState. As part of this convertion we would like to speed up our application. I know carrying around ViewState slows things down but I do not see a way around this for an editable grid where we get our data from a SQL datasource. If I turn off EnableDataViewState, I have to bind my data on every post-back and lose the changes the use entered.
Is there suggestions on when to set these values to true or false?
Hello IntegraSys76,
“EnableAjax” property is used to control if the gird will use its own Ajax functionality (the grid is built upon our Ajax Framework - Aikido) and will generate Async Postbacks to the Server or will make full Postbacks to the Server – when property is set to “false”. The second option is useful if for example “UpdatePanel” is used and the grid is in its content template - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Infragistics4.Web.v11.2~Infragistics.Web.UI.GridControls.WebDataGrid~EnableAjax.html
“EnableAjaxViewState” property is used to determine if ViewState should be used when control performs Async Postbacks - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Infragistics4.Web.v11.2~Infragistics.Web.UI.Framework.Data.FlatDataBoundControl~EnableAjaxViewState.html
“EnableDataViewState” property (when enabled) keeps the grid’s row collection in the ViewState. This allows grid to be bound only on initial load and maintain data between Postbacks without binding to the Data Source - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/WebDataGrid_Getting_Started_with_WebDataGrid_EnableDataViewState_Property.html
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Infragistics4.Web.v11.2~Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid~EnableDataViewState.html
“EnableViewState” property when enabled keeps track of style settings (CSS) and meta-data about the rows. That is the difference with DataViewState which keeps the row data instead.
Separation of the two ViewStates is done for additional improvement of performance – when data are not needed only information about rows is preserved and the size of the ViewState is reduced.
http://community.infragistics.com/aspnet/articles/webdatagrid-dataviewstate-vs-viewstate.aspx
Let me know if you need further information regarding this question.