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

radgrid itemdatabound on records on first page

1 Answer 216 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 28 Jun 2011, 08:01 PM
I have a question about how itemdatabound works.  I have a sql query that pulls about on average 200 records, not a lot, query runs in seconds.  My problem is i have validation on every column, about 15 columns in each row, that needs to happen but i think that itemdatabound runs against all the data pulled from the SQL query instead of the first 20 records in the radgrid.  i have the radgrid paging set to 20 records per page.  is there a way to have itemdatabound events to run only on the page being viewed instead of all records returned???  

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 29 Jun 2011, 01:39 PM
Hi Mike,

The ItemDataBound event is fired for each item of the grid after it has been bound to data. Normally the grid only creates and binds items for the current page (unless configured explicitly to do otherwise). So in your case the event should be fired only 20 times. If the event do fires for all items then it is probably an issue with the binding configuration of the grid.

All the best,
Marin
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
Mike
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or