I would like to have a RadGrid inside a UserControl with Sorting and Paging Events.
I have tried to do it thusfar but cannot understand how to do it.
Would someone please detail how this is done?
Summary:
- Require a RadGrid inside a custom UserControl. The RadGrid must support sorting, paging and export to pdf whilst still inside the UserControl.
Thankyou,
Serban.
I have tried to do it thusfar but cannot understand how to do it.
Would someone please detail how this is done?
Summary:
- Require a RadGrid inside a custom UserControl. The RadGrid must support sorting, paging and export to pdf whilst still inside the UserControl.
Thankyou,
Serban.
5 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 22 Dec 2010, 09:51 AM
Hello Serban,
You can simply place the RadGris inside UserControl and populate it. You could either use any DataSource control or set the DataSource from code behind to populate the RadGrid.
Automatic data source operations are possible using radgrid. Check the documentation elaborates the same:
Automatic DataSource operations
If you want to set the datasource from code behind, then make use of NeedDataSource event, which is the technique known as Advanced data binding. IF following advanced data binding technique, we dont need to write code for advanced features like paging, sorting, filtering etc. Check the link, for more information on the technique.
Advanced Data-binding (using NeedDataSource event)
-Shinu.
You can simply place the RadGris inside UserControl and populate it. You could either use any DataSource control or set the DataSource from code behind to populate the RadGrid.
Automatic data source operations are possible using radgrid. Check the documentation elaborates the same:
Automatic DataSource operations
If you want to set the datasource from code behind, then make use of NeedDataSource event, which is the technique known as Advanced data binding. IF following advanced data binding technique, we dont need to write code for advanced features like paging, sorting, filtering etc. Check the link, for more information on the technique.
Advanced Data-binding (using NeedDataSource event)
-Shinu.
0

Serban
Top achievements
Rank 1
answered on 04 Jan 2011, 12:44 AM
Shinu,
Thanks for your reply. The issue I am having is that whilst inside the User Control the RadGrid does not sort when "AllowSorting=True" is set.
Do all of the events fire correctly even inside a User Control?
Thanks,
Serban.
Thanks for your reply. The issue I am having is that whilst inside the User Control the RadGrid does not sort when "AllowSorting=True" is set.
Do all of the events fire correctly even inside a User Control?
Thanks,
Serban.
0

Dave
Top achievements
Rank 1
answered on 15 Apr 2011, 07:06 PM
I'm having the same issue. I've worked with RadGrids in the past with no problem. Why isn't the sorting working, and why has there not been a reply to this thread since January??? The control set is not cheap...
0
Hello Serban,
I tried to replicate the described issue locally but to no avail.
Please find attached a sample runnable application which demonstrates the correct behavior of this scenario.
Regards,
Maria Ilieva
the Telerik team
I tried to replicate the described issue locally but to no avail.
Please find attached a sample runnable application which demonstrates the correct behavior of this scenario.
Regards,
Maria Ilieva
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.
0

Dave
Top achievements
Rank 1
answered on 21 Apr 2011, 02:19 PM
Serban,
I was having the same issue. The way I solved it was instead of using a SqlDataSource to populate the grid, I extracted the data into a DataTable and manually added that as the data source for the RadGrid. Now sorting works fine. Also, you may need to disable the Viewstate for the RadGrid. Hope this helps, although its almost 4 months after your last post, so I doubt its still relevant. Way to go Telerik...
-Dave
I was having the same issue. The way I solved it was instead of using a SqlDataSource to populate the grid, I extracted the data into a DataTable and manually added that as the data source for the RadGrid. Now sorting works fine. Also, you may need to disable the Viewstate for the RadGrid. Hope this helps, although its almost 4 months after your last post, so I doubt its still relevant. Way to go Telerik...
-Dave