Paging in Gridview
-
Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..
-
Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..
This problem occurs when u have enabled the paging and have not written the code in page index change function.and even then trying to click the page no which got generated in ur gridview.
-
Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..
If you are populating you gridview in code you have to write code in you PageIndexChanging event to repopulate the gridview. You start with the following line of code: GridView1.PageIndex = e.NewPageIndex; This is to get the Page you selected, but now you have to repopulate the gridview control. Hope this helps.
-
Iam Binding a gridview through code without using Datasource.I have enabled Paging.But I get the below error when I click the paging below.Is there any other properties I have to set ? The GridView 'GridView1' fired event PageIndexChanging which wasn't handled. Thanks In advance..
BINO VARGHESE wrote:
The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
As a result of not setting the DataSourceID property of the GridView to a DataSourceControl DataSource, you have to add event handlers for sorting and paging. For more Details Get it[^]
Regards, Satips.:rose:
-
BINO VARGHESE wrote:
The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
As a result of not setting the DataSourceID property of the GridView to a DataSourceControl DataSource, you have to add event handlers for sorting and paging. For more Details Get it[^]
Regards, Satips.:rose:
Thank you all for your replies. I have added GridView1.PageIndex = e.NewPageIndex in Pageindexing event of the gridview ..now no errors but the gridview is not populating any values.I believe I have to add some code to show exactly that particular page.Can any one pls give a Jist Idea about it. Thanks in advance
-
BINO VARGHESE wrote:
The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
As a result of not setting the DataSourceID property of the GridView to a DataSourceControl DataSource, you have to add event handlers for sorting and paging. For more Details Get it[^]
Regards, Satips.:rose: