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

To get the total count of records

1 Answer 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 17 May 2012, 02:31 PM
Hallo
     I have more than 250 records in my grid. I have enabled paging and filtering in my grid. However im unable to get the total count of the records. I have tried prerender, but all im able to get is the count of the records in the current page. Please help me out..
thanks
Savyo

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 May 2012, 02:40 PM
Hi Savyo,

Try the following code snippet to get the total count of records.

C#:
protected void RadGrid1_ItemEvent(object sender, GridItemEventArgs e)
{
    if (e.EventInfo is GridInitializePagerItem)
    {
        int RowCount = (e.EventInfo as GridInitializePagerItem).PagingManager.DataSourceCount;
    }
}

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