Hi I assign datasource the gridview by data reader In code behind VB of ASP .Net. And work very well . But the problem is that when i was sorting or Paging it. It throw a errorFor paging i write some codeMe.gridview.Pageindex=e.Pageindexme.gridview.databind()But nothing happen , So let me know if i wnat to want to sorting and paging in the gridview then what should i need to doSushil sharma

Showing Answers 1 - 2 of 2 Answers

pktelango

  • Jun 14th, 2006
 

hi

Me.gridview.Pageindex=e.Pageindex
me.gridview.databind()

In between this two line you should assign the value to datasource property.

Me.gridview.Pageindex=e.Pageindex

Me.gridview.Datasource = datatable/arraylist/[values]
me.gridview.databind()

  Was this answer useful?  Yes

Rajkumar

  • Jun 23rd, 2006
 

If we want to enable the paging then right click the Grid View and select show smart tag. Then click on Enable Paging. Then there is no need to write even that code.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions