Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 591
  • Last Modified:

How to set paging in gridview

Hi,
I am using below mentioned code which is showing data in gridview perfectly. However, the paging is showing error

C # Code
code
Error:
error
Other Code
other codes
Please help how to fix it.
rgds.
Mehram
0
Mehram
Asked:
Mehram
  • 2
  • 2
1 Solution
 
informaniacCommented:
0
 
Friman001Commented:
Hello,

On the *.aspx page you need to have a property set to handle the trigger of the paging event. Right now, you have the method in the code behind file to handle that event, but it will never get called because the actual GridView never handles the triggered event.

So, you could just put "onpageindexchanged="GridView1_PageIndexChanged" in to the GridView tag or you can click on the GridView in Design mode in VS2010, press F4, and in the properties window click the yellow lightning bolt. This will show you the entire event driven properties of the GridView. If you click in the "OnPageIndexChanged" value back, you will see a dropdown arrow. Select that and you will see all of the possible methods that you could call. Find yours and select it (or double click in the value box and it will auto-generate a method for you!)

Ryan F
0
 
MehramAuthor Commented:
I tried it but its not working. I have asked the same question after correct it. can you please see that?
0
 
informaniacCommented:
Are you still getting the error PageIndexChanging event not handled? Or is it some other error.
0
 
MehramAuthor Commented:
No, the error is no more but on click page, 2,3, or any one else the grid disappear to the page silently without showing any error. My present code you can refer here:

http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_27825715.html
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now