This is a migrated thread and some comments may be shown as answers.

Problem with Persistence

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nirmala
Top achievements
Rank 1
Nirmala asked on 16 Aug 2011, 09:11 PM
Hi, 

I have created a rad grid for my application. It was working fine with persistence until i added an another column in the grid.
Suppose i have 3 columns , 1,2,3 i added the 4th column in between 2 and 3. When it loads the grid without persisting it loads in the correct format but after it starts persisting it would change the order of columns to 1,2,3,4 but it is supposed to be 1,2,4,3. I couldn't find out why it is working like that.

I used this example for persisting http://www.telerik.com/help/aspnet-ajax/grid-saving-settings-on-per-user-basis.html

Any help is appreciated.

Thanks,
Nimmy.

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 19 Aug 2011, 10:19 AM
Note that loading additional columns and then restoring a previously persisted state is not supported. If you have persisted 3 columns, loading the same state for grid that now has 4 columns will cause unexpected behavior. In your particular case, the grid has saved an OrderIndex of 2 (0-based) for your third column. When you restore the grid settings after adding an extra column on the 3rd place, your column 3 (which is supposed to go last), gets a restored OrderIndex value of 2, which is exactly where the new column is. You get a broken ordering after settings are restored. When persisting grid settings, RadGrid needs to contain exactly the same columns.

Veli
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Nirmala
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or