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

Grid Paging Problem

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sertac
Top achievements
Rank 1
Sertac asked on 15 Apr 2011, 04:10 PM
Hi,

I used grid but I have a method as a class. I bind  datasourse of grid like,
                  
             DataSet dsCategories = null;
                   dsCategories = ct.GetAllCategories();
                    RadGrid2.DataSource = dsCategories;
Problem is paging in the grid. Becouse you suggested to us flowwing using.
        <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers"
            runat="server"></asp:SqlDataSource>

Instead of it, I want to use datasourse for paging or filtering etc.. How I bind it? Thanks.

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 18 Apr 2011, 09:16 AM
Hi Sertac,

I would suggest you to use Advanced Data Binding technique by attaching NeedDataSource event. Now in the NeedDataSource event, set the DataSource of grid as shown in the demo. The NeedDataSource event is especially designed to facilitate the work of the developers as you do not need to handle any sorting/paging/grouping/filtering/etc. commands manually.

Regards,
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
Sertac
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or