470,849 Members | 1,059 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

GridView Paging Problem

I have displayed the data from the DB to the GridView made a column in the GridView as HyperLink allowed paging by setting the Allow Paging Property to "True". By clicking on the page no link I have to view other records. For that I have given the coding as

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
GridView1.PageIndex = e.NewPageIndex;

When I run, It shows the following error

The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.

But when I set the Datasource Property of the GridView, then paging is running properly but the hyperlink button in the GridView is getting hided i.e the data without the hyperlink is getting displayed. The thing is I want both the page event to occur & the hyperlink field should also get displayed.
Jun 16 '08 #1
1 1818
7,872 Expert 4TB
GridView1.DataBind(); only applies to have a binding datasource I think(DataSource=<something>)
If you don't have one, the call will fail?
Jun 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Greg Lyles | last post: by
9 posts views Thread by =?Utf-8?B?c3Jpbml2YXM=?= | last post: by
3 posts views Thread by Marc Grutte | last post: by
2 posts views Thread by antonyliu2002 | last post: by
5 posts views Thread by Andrew Robinson | last post: by
reply views Thread by Don Miller | last post: by
4 posts views Thread by Don Miller | last post: by
4 posts views Thread by Peter | last post: by
reply views Thread by Jeff | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.