PC Review


Reply
Thread Tools Rate Thread

DataGrid page level delete all function

 
 
=?Utf-8?B?UHJhZGVlcA==?=
Guest
Posts: n/a
 
      28th Oct 2005
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
 
Reply With Quote
 
 
 
 
S.M. Altaf [MVP]
Guest
Posts: n/a
 
      29th Oct 2005
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

"Pradeep" <(E-Mail Removed)> wrote in message news:A532C433-F021-40D7-8D6C-(E-Mail Removed)...
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
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid page level delete all error =?Utf-8?B?UHJhZGVlcA==?= Microsoft ASP .NET 1 28th Oct 2005 11:22 PM
page-level vs control-level enableViewState =?Utf-8?B?Sm9l?= Microsoft ASP .NET 3 26th Oct 2005 08:14 PM
Page Level and Applicatoin Level Custom Errors rranveer@gmail.com Microsoft ASP .NET 2 13th Feb 2005 02:03 AM
Security: Data level or function level? Microsoft Access Database Table Design 1 18th Mar 2004 11:45 AM
Security: Data level or function level? Lawrence Mak Microsoft Access Security 1 15th Mar 2004 09:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:05 AM.