Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1147
UltraWebGrid retain grid state after postback
posted

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.

Parents
  • 14049
    Suggested Answer
    Offline posted

    Hi,

    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.

Reply Children