I have created one form.In that form,after clicking on button result shown in grid.In cs file ,I am writing code for executing query and store result in dataset and bind.It is working fine.In grid,I mention flase to autogenerated columns,declare new columns and allowpaging and given page size.when I selecting perticular user,that person's data seen in gridview.If record not available,showing no record available.Suppose When selecting user called nadini, record seen in grid.When I am selecting other user,that person's data is not available,displaying that no record available.But grid (previously appear for nandini) is not disappear.So I tried to write like this gridview.datasource ="";gridview.DataBind(); at starting of button click event.I am getting error that The data source does not support server-side data paging.
Asked
Active
Viewed 4,563 times
1
-
Add your Databind on your datagrid paging event on code behind – BizApps Feb 22 '12 at 07:34
-
you can use sqldatasource or object datasource and bind it to your datagrid. – BizApps Feb 22 '12 at 08:03
-
1I have solved my problem by doing like this,in button click event before writing these 2 statement(gridview.Datasource =""; gridview.DataBind()),wrote allowpaging = flase and after writing the above 2 statement again wrote allowpaging = true;.It is working properly. – Jui Test Feb 22 '12 at 08:39
-
what i know is `list` for example doesn't support paging as a datasource . u can use datatable ,or sqldatasource – Anyname Donotcare Feb 22 '12 at 13:45
1 Answers
0
I had the same issue. I found out that my problem was passing an IEnumerable<T>
as the GridView3.DataSource
. I solved it by changing to an IList<T>
The solution here is kinda the same.

Community
- 1
- 1

mugume david
- 635
- 9
- 18