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

RadGrid with dynamic data

1 Answer 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 14 Jul 2011, 02:11 PM
Hi Guys,

I'm using a RadGrid to show the results of a phone book on my company's website. I can load the information just fine, however the paging is just not right. I give the users the ability to search for a name and/or they can choose from a dropdown for the department or location. Initially the page loads just fine and if there is more than 20 results for their query the paging shows as it should. When I go to the next page in the paging, I get an empty grid.

The grid is connected to an SqlDataSource (as with the 2 dropdowns) and on the submit button, I dynamically change the SqlDataSource to whatever the user wants to search on.

Any help will be greatly appreciated!

William

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Jul 2011, 06:31 AM
Hello William,

The issue may occurs because you are binding the grid using Simple data binding technique. If you are using any advanced feature in grid(like paging), then a better approach is binding RadGrid using "AdvancedData binding" using NeedDataSource event.

For more information about this can be available here.

Advanced Data-binding (using NeedDataSource event).
Grid / Advanced Data Binding.

Thanks,
Shinu.
Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or