DataGrid page level delete all function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Here is my issue. I have a datagrid on my aspx page. I have paging enabled
for the datagrid. Suppose Suppose I have 3 pages in my datagrid. When I go to
the last page (which is the 3rd page here) and select all the messages and
delete, since the delete is on a page level, it deletes all the messages on
that page. But the problem is that since now my datagrid doesnt' have a 3rd
page and I am still on the 3rd page, its throwing an error. Any
ideas/solutions on how to tackle this.

Thanks in advance.
Pradeep
 
Hi,

You'll need to perform a check yourself by looking at the CurrentPageIndex property and comparing it with recordcount divided by pagesize. If the CurrentPageIndex is larger, reset it to the value you get when you divded the recordcount and page size.

HTH,
Altaf



--------------------------------------------------------------------------------

All that glitters has a high refractive index.
www.mendhak.com

Hi,
Here is my issue. I have a datagrid on my aspx page. I have paging enabled
for the datagrid. Suppose Suppose I have 3 pages in my datagrid. When I go to
the last page (which is the 3rd page here) and select all the messages and
delete, since the delete is on a page level, it deletes all the messages on
that page. But the problem is that since now my datagrid doesnt' have a 3rd
page and I am still on the 3rd page, its throwing an error. Any
ideas/solutions on how to tackle this.

Thanks in advance.
Pradeep
 
Back
Top