Imports Telerik.Web.UI
Partial Class DefaultVB
    Inherits System.Web.UI.Page
 
    Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
        If TypeOf e.Item Is GridPagerItem Then
            Dim pager As GridPagerItem = DirectCast(e.Item, GridPagerItem)
            Dim lbl As Label = DirectCast(pager.FindControl("ChangePageSizeLabel"), Label)
            lbl.Visible = False

            Dim combo As RadComboBox = DirectCast(pager.FindControl("PageSizeComboBox"), RadComboBox)
            combo.Visible = False
            ' Label1.Text = CType(e.Item, GridPagerItem).Paging.DataSourceCount.ToString()
        End If
    End Sub
    'Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles Me.PreRender
    '    Dim pagerItem As GridPagerItem = DirectCast(RadGrid1.MasterTableView.GetItems(GridItemType.Pager)(1), GridPagerItem)
    '    Dim textBox As RadNumericTextBox = DirectCast(pagerItem.FindControl("ChangePageSizeTextBox"), RadNumericTextBox)
    '    textBox.MaxValue = 5
    'End Sub
End Class
