T
Tom
Hi,
I have been through all kinds of documentation on the datagrid and
dataviews. I have many expensive books that I have looked through. But
nothing has really helped. I want to find out and retrieve copies of
any selected records that are in a dataview. One thing I have done is
used the MouseDown event and HitTestInfo to find out what record has
been clicked on. This tells me the current record and I can retrieve
the record and add it to my collection . But what if a user holds the
Shift key down to select multiple records? What if they only use the
keyboard and bypass the mouse altogether?
I need to know what records are <B>selected</B> by the user and then
retrieve copies of them. I know of the DataGrid.IsSelected(index)
function, but what if the datagrid has a million records? I know that
sounds like an impractical amount, but I don't know how many records
will be returned by a query. I have to take a million record
possibility into account. And some of our tables have more than a
million records.
IsSelected() is not very practical when there are a lot of records. Is
there some other way?
One other thing. What if I want to get the selected DataRowView from
the dataview and then add it to a data table? I get errors saying that
you can't convert the DataRowView to a DataRow. This is even when the
schema for the DataRowView is exactly the same as the DataRow and
DataTable.
Thanks for any help on this,
Tom Graves
I have been through all kinds of documentation on the datagrid and
dataviews. I have many expensive books that I have looked through. But
nothing has really helped. I want to find out and retrieve copies of
any selected records that are in a dataview. One thing I have done is
used the MouseDown event and HitTestInfo to find out what record has
been clicked on. This tells me the current record and I can retrieve
the record and add it to my collection . But what if a user holds the
Shift key down to select multiple records? What if they only use the
keyboard and bypass the mouse altogether?
I need to know what records are <B>selected</B> by the user and then
retrieve copies of them. I know of the DataGrid.IsSelected(index)
function, but what if the datagrid has a million records? I know that
sounds like an impractical amount, but I don't know how many records
will be returned by a query. I have to take a million record
possibility into account. And some of our tables have more than a
million records.
IsSelected() is not very practical when there are a lot of records. Is
there some other way?
One other thing. What if I want to get the selected DataRowView from
the dataview and then add it to a data table? I get errors saying that
you can't convert the DataRowView to a DataRow. This is even when the
schema for the DataRowView is exactly the same as the DataRow and
DataTable.
Thanks for any help on this,
Tom Graves