E
Eric Harmon
Hi,
I have a bit of an issue that I don't know how to deal with. I have a
dataview connected to a datagrid. I don't know exactly how the dataview
might be sorted at any point in time, as the user can click on the grid
headers to change the sort order.
Regardless of how the grid/dataview is sorted, I have a routine that I call,
which adds a row to the underlying table, using MyTable.NewRow(),
MyTable.AddRow(), etc. The row shows up in the grid in the correct order,
but I want to set focus to the newly added row. I know the ID (primary key)
of the row just added, but the grid might be sorted by name, city, state,
etc.
What's the best way to find the index of the newly added item in the
dataview/grid regardless of sort order, so I can set it as the current row?
Thanks in advance for any help you can provide...
-Eric
I have a bit of an issue that I don't know how to deal with. I have a
dataview connected to a datagrid. I don't know exactly how the dataview
might be sorted at any point in time, as the user can click on the grid
headers to change the sort order.
Regardless of how the grid/dataview is sorted, I have a routine that I call,
which adds a row to the underlying table, using MyTable.NewRow(),
MyTable.AddRow(), etc. The row shows up in the grid in the correct order,
but I want to set focus to the newly added row. I know the ID (primary key)
of the row just added, but the grid might be sorted by name, city, state,
etc.
What's the best way to find the index of the newly added item in the
dataview/grid regardless of sort order, so I can set it as the current row?
Thanks in advance for any help you can provide...
-Eric