Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Datav

Reply
Thread Tools

Datav

 
 
Paul
Guest
Posts: n/a
 
      12-08-2003
Hi,
I've got a DataGrid bound to a DataView that is sorted. ("Aha!", I hear
you saying.)

When I go to EditMode on the grid I get the right DataRow, but I get the
wrong index from e.item.itemindex (of course.) Therefore, what I'm
doing pretty much sucks as the Update updates the wrong record.

How do I get the index of the selected item in a DataView? I get the
results I want by hardcoding the index like this:

DataRow1 = DataView1.Table.Rows(10)

Thanks for your help, I've been searching in Google and MSDN for days
with no luck. ~P



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Steve Landess
Guest
Posts: n/a
 
      12-12-2003
> "Paul" wrote:
> I've got a DataGrid bound to a DataView that is sorted. ("Aha!", I hear
> you saying.)
> When I go to EditMode on the grid I get the right DataRow, but I get the
> wrong index from e.item.itemindex (of course.) Therefore, what I'm
> doing pretty much sucks as the Update updates the wrong record.
>
> How do I get the index of the selected item in a DataView? I get the
> results I want by hardcoding the index like this:
>
> DataRow1 = DataView1.Table.Rows(10)



Would DataGrid.CurrentCell.RowNumber() work?



 
Reply With Quote
 
 
 
Reply

Thread Tools

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




Advertisments