D
David Jackson
Hello,
I'm using VS.NET 2005.
I have a ListView populated with data pulled from a SQL Server database.
I have wired up a SelectedIndexChanged event, but I can't find any way of
retrieving the value of the previously selected record.
For example, if the ListView looks like this:
Record A
Record B
Record C
Record D
Record E
Record F
where Record B currently selected.
If the user then clicks on Record E, the SelectedIndexChanged event fires,
of course, but from within the event itself I can't seem to find any way of
finding out what the previously selected record was. Based on the event
model for some other controls, I thought there might have been a
SelectedIndexChanging event, but there isn't.
Obviously, a workround is simple enough - store the value of the currently
selected record in a form-level variable, but is that the best / only way to
do this?
Thank you,
DJ
I'm using VS.NET 2005.
I have a ListView populated with data pulled from a SQL Server database.
I have wired up a SelectedIndexChanged event, but I can't find any way of
retrieving the value of the previously selected record.
For example, if the ListView looks like this:
Record A
Record B
Record C
Record D
Record E
Record F
where Record B currently selected.
If the user then clicks on Record E, the SelectedIndexChanged event fires,
of course, but from within the event itself I can't seem to find any way of
finding out what the previously selected record was. Based on the event
model for some other controls, I thought there might have been a
SelectedIndexChanging event, but there isn't.
Obviously, a workround is simple enough - store the value of the currently
selected record in a form-level variable, but is that the best / only way to
do this?
Thank you,
DJ