Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bindingcontext position and datatable.row
Message
From
01/02/2003 17:35:27
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00748036
Message ID:
00748040
Views:
17
Don,

I haven't used grids, but when I do a similar thing with a ListView, I store the Row pointer in the Tag property of the ListView. Off the top of my head, I don't if the grid has a Tag property, but you could always add a custom property to use for this purpose if necessary.

~~Bonnie


>I'm trying to use a form's BindingContext.Position in a grid to correctly locate a matching Datatable.Row(), BUT...
>
>When I first bind a grid, these match one-for-one. But if I click on a column header and resort the column, the Bindingcontext.Position changes to a new number based on the new sorting order. So a .Position that was previously at 1 could now be at .Position=512, which goes out of sync with the datatable, which keeps the original DataTable.Row at 1.
>
>Does anyone know a way to directly access the correct datarow using BindingContext.Position? Or must I use other techniques?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform