How do you bind data to multiple columns as a list?

I have a data source that I want to bind to a list that has multiple columns. How to link your data source to this list

Here is some kind of pseudo code that doesn't work to help illustrate what I'm trying to do:

MyDataTable dt = GetDataSource();
ListView1.DataBindings.Add("Column1.Text", dt, "MyDBCol1");
ListView1.DataBindings.Add("Column2.Text", dt, "MyDBCol2");

- change -

Sorry, I forgot to mention that these were winforms.

+5
source share
4 answers

There seems to be a gap in the functionality of the ListView WinForms control (considering it possible to databind the new WPF ListBox).

Nick Karnik , , WinForms ListView - ListView.

+3

, winforms vs webforms? ListView. DataBindings.Add winforms.

DataGridView ? ?

0

Listview , .

DatagridView Listview.
, .

0
-3

All Articles