J Joe Au Aug 19, 2004 #1 I enable paging on a data grid. But when I click on the page number, nothing happen. Do I have to code something to handle it? Thanks.
I enable paging on a data grid. But when I click on the page number, nothing happen. Do I have to code something to handle it? Thanks.
J Jos Aug 19, 2004 #2 Joe said: I enable paging on a data grid. But when I click on the page number, nothing happen. Do I have to code something to handle it? Thanks. Click to expand... You need to handle the PageIndexChanged event. Use this code (for VB): Sub DataGrid1_PageIndexChanged(sender As Object, e As DataGridPageChangedEventArgs) DataGrid1.CurrentPageIndex = e.NewPageIndex BindData() ' bind the grid again End Sub For more information, see: http://aspnet.4guysfromrolla.com/articles/070903-1.2.aspx or search Google for "datagrid paging".
Joe said: I enable paging on a data grid. But when I click on the page number, nothing happen. Do I have to code something to handle it? Thanks. Click to expand... You need to handle the PageIndexChanged event. Use this code (for VB): Sub DataGrid1_PageIndexChanged(sender As Object, e As DataGridPageChangedEventArgs) DataGrid1.CurrentPageIndex = e.NewPageIndex BindData() ' bind the grid again End Sub For more information, see: http://aspnet.4guysfromrolla.com/articles/070903-1.2.aspx or search Google for "datagrid paging".