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

Dynamically generated grid and maintaining view state

1 Answer 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 11 Jan 2011, 08:15 PM
Hi, Does anyone have a sample of a grid that is created in code behind and maintains view state when sort or filter operations take place?

In looking at this post   http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html it states 'No ViewState is required for grid structure to be persisted as it is recreated on each page initialization. ' However when we create a grid that allows filtering, paging, sorting etc. in code behind and add it to a place holder and then try to sort or filter, we lose the grid. The grid is being created every time in post back (no isPostBack test takes place).

If there is a sample of how to accomplish this that would be great. Thanks.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 17 Jan 2011, 09:53 AM
Hello Karl,

Please find attached a simple working project which demonstrates how you can achieve the desired functionality. Give it a try and let me know if it helps.

Best wishes,
Pavlina
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
Karl Wilkens
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or