DataBinding a ListView - HOWTO

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! I am using a listview to display a set of client records. I am populating that using a 'foreach' statment with values from a dataset. Depending on which row is selected, I would like to bring up a panel with controls populated with other data. Is it possible to databind a listview to the same data source as other controls? Please suggest some approaches or logic
Thanks for the time
Regards
Raj
 
Raj,

The ListView control doesn't support databinding like DataGrid, but you can
use the listView.FocusedItem from a SelectedIndexChanged event handler to
get back to the particular data item. Another approach is to use an
ItemActivated event handler - it just depends on how you want your UI to
behave.
--
Ginny Caughey
..Net Compact Framework MVP

Raj said:
Hi! I am using a listview to display a set of client records. I am
populating that using a 'foreach' statment with values from a dataset.
Depending on which row is selected, I would like to bring up a panel with
controls populated with other data. Is it possible to databind a listview to
the same data source as other controls? Please suggest some approaches or
logic.
 
Back
Top