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

viewstate of radgrid and reporting

1 Answer 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anil K
Top achievements
Rank 1
Anil K asked on 02 Oct 2009, 05:40 PM
Two questions:
1. RADGRID 2006 : How do you maintain the viewstate of the radgrid across postbacks. How do you access the viewstate values of filter and sorted fields. In addition I have added a checkbox item in the grid and how do I retrieve the checkbox checked values across the postbacks from the viewstate. Isn't the viewstate by default holds the values and you can access them across the postbacks? Or is it explicitly you have to store them in a variable and retrieve back. I am looking for programmatically retrieving the fileter, paging and sorted fields in the code. Is there a difference between the RADGRID 2006 and 2009 versions for the purpose.

2. How do you pass on the viewstate information of the radgrid to the telerik reporting (2009). For example I am storing the sorted and filtered fields in session variable and passing it to the report viewer which doesn't seem to work correctly. Of course I need even to pass the parameters. I could get the report but messes up with sorting order. A sample code transferring viewstate information from radgrid to telerik reporting would be helpful.

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 07 Oct 2009, 06:27 AM
Hi Anil K,

Thank you for contacting us and up to your questions:
  1. Basically, depending on the operations which you perform, the grid may need to have its state preserved. The filter can be accessed by using the RadGrid1.MasterTableView.FilterExpression. The sorting expressions are available through the SortingExpressions collection of the control. Additionally, you may be interested to review the following article for additional information:

    http://www.telerik.com/help/aspnet-ajax/grdsavingsettingsonperuserbasis.html
  2. Check this forum thread for more information on such scenario.

I hope this information helps.

Regards,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Anil K
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or