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

My PagingManager is Nothing

2 Answers 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Johan
Top achievements
Rank 1
Johan asked on 04 Aug 2008, 09:43 AM

Hi,

I would like to get the number of item in my datasource but with the sorting i only have the item of the page.

Me.myradgrid.MasterTableView.Items.Count

So i try using the PagingManager,but my PagingManager is nothing...

Me.myradgrid.MasterTableView.PagingManager.DataSourceCount

I call theses instructions in my behind-code to update a label in the databound fonction of my radgrid.

Thx



 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 04 Aug 2008, 10:50 AM
Hello Johan,

You can find out the number of items in the datasource through RadGrid by subscribing to the ItemEvent event and then using the DataSourceCount property of the PagingManager:

Protected Sub RadGrid1_ItemEvent(ByVal sender As ObjectByVal e As GridItemEventArgs) 
    If TypeOf e.EventInfo Is GridInitializePagerItem Then 
        Dim allRowsCount As Integer = (TryCast(e.EventInfo, GridInitializePagerItem)).PagingManager.DataSourceCount 
    End If 
End Sub 


Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Johan
Top achievements
Rank 1
answered on 04 Aug 2008, 01:01 PM
It's ok.

Thank You
Tags
Grid
Asked by
Johan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Johan
Top achievements
Rank 1
Share this question
or