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

Question about Grid custom paging

1 Answer 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marietta
Top achievements
Rank 1
Marietta asked on 12 Mar 2009, 07:00 PM

Hi,

I am using custom paging in my grid with a ObjectDataSource. I have read that we can also do custom paging using the NeedDataSource event. I would like to know what is the criteria to select the method (ObjectDataSource or NeedDataSource ).

Thanks

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 16 Mar 2009, 08:04 AM
Hello Marietta,

When using simple data-binding, you do not need to call the DataBind method when loading the page on postbacks; after postback RadGrid uses the ViewState to recreate the data. You do, however, need to assign the data source and rebind the grid after any data operation such as paging, sorting, editing, and so on.
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. Under such circumstances Telerik RadGrid will be "smart enough" to perform the corresponding operation automatically.

More information about simple data binding is available in the following articles:
Help topic 
Demo

For more information about custom paging through NeedDataSource and ObjectDataSource, please refer to the following articles:
Custom paging through ObjectDataSource population
Custom paging

All the best,

Pavlina
the Telerik team

 


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Marietta
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or