Hi,
I am using UltraWebGrid . Binding it through OnInitializeDataSource event handler to use ajax. it contains hierarchical data. when I expand one of hierarchy it post backs and gets a new rows from database.
what I want is to retain the state of grid when I move columns of grid or refreshes a page.
it reset's grid to default position where all heirarchies collapsed and on a first page of paged grid.
I know this is problem of PostBack but I dont know what is the solution. As I want Ajax and retaining the state at the same time.
Please help.
Using this event to bind the grid has advantages and disadvantages. The view state is really small, but the state of the rows is lost. It sounds like for your scenario you're better off not using this event, but putting all of the rows into the view state by simply setting the DataSource property and calling DataBind() on the initial post back.
Another thing you can try is keep using InitializeDataSource and setting DisplayLayout.XmlLoadOnDemandType=Accumulative.
Sory for the delay
I tried DisplayLayout.XmlLoadOnDemandType=Accumulative but it is not solves my problem of retaining state.
as if navigate to second page and says F5 refresh , it again goes to the 1st page of grid.
It may be possible I am not using this event appropriatly, if so plesae let me know the perfect way.
I am directly binding the dataset to the ultragrid in InitializeDataSource event.