|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid Inserts and PagingI have a grid that allows inserts and has paging. The inserts work fine
when the new item is on the 1st page. The blank line is inserted and I'm in edit mode. If the new item is on a page other than the 1st, a new blank record is added and I have to manually go to that page and edit the item. How can I determine that the new item is on a new page and go directly to that page in edit mode? I'm using VB and the insert does a .newrow. one approach would be to loop the datagrid looking for the edititemindex
property which should not be equal to -1. Once you find it, you can make a note of where the index is relative to the record count and then figure out the page it is on. The assumption is that you know the number of records per page. -- Show quoteHide quoteRegards, Alvin Bruney [MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ http://tinyurl.com/27cok ---------------------------------------------------------- "ComStar" <ComS***@discussions.microsoft.com> wrote in message news:BE491E6F-B615-4C99-9D52-86564B75C529@microsoft.com... >I have a grid that allows inserts and has paging. The inserts work fine > when the new item is on the 1st page. The blank line is inserted and I'm > in > edit mode. If the new item is on a page other than the 1st, a new > blank > record is added and I have to manually go to that page and edit the item. > > How can I determine that the new item is on a new page and go directly to > that page in edit mode? > > I'm using VB and the insert does a .newrow. |
|||||||||||||||||||||||