M
Malcolm
I am trying to populate a CheckedListBox from a dataset and it's just
not working for me.
I have no problem hooking a dataGrid up to a dataSet.
I found an article at
http://www.dotnet247.com/247reference/msgs/1/5631.aspx
that basically said
*******************************
Set the DataSource and DisplayMember properties of the CheckedListBox
as shown below:
CheckedListBox1.DataSource = DataSet1.Tables("Suppliers")
CheckedListBox1.DisplayMember = "ProductName"
*******************************
My only problem with this solution is that in 2003 checkedListBoxes
DON'T HAVE a DataSource OR a DisplayMember method.
Did they used to in prior versions of VS.Net? And more importantly,
how do I get this done.
I'm thinking about scrapping the checkedListBox solution to my problem
set even though it is EXACTLY what the customer would like to have,
and of course it bothers me that I can't figure out how to get it to
do what I think it should be able to do.
The only thing I can think of is to take the dataSet and figure out
how to pop each record out of it, one at a time, and insert it into
the list box with the Add method. (or AddRange if I can figure out
how to dump the contents of a dataSet to an array).
TIA
Malcolm
"Bother," said the Borg, "we just assimilated Pooh."
not working for me.
I have no problem hooking a dataGrid up to a dataSet.
I found an article at
http://www.dotnet247.com/247reference/msgs/1/5631.aspx
that basically said
*******************************
Set the DataSource and DisplayMember properties of the CheckedListBox
as shown below:
CheckedListBox1.DataSource = DataSet1.Tables("Suppliers")
CheckedListBox1.DisplayMember = "ProductName"
*******************************
My only problem with this solution is that in 2003 checkedListBoxes
DON'T HAVE a DataSource OR a DisplayMember method.
Did they used to in prior versions of VS.Net? And more importantly,
how do I get this done.
I'm thinking about scrapping the checkedListBox solution to my problem
set even though it is EXACTLY what the customer would like to have,
and of course it bothers me that I can't figure out how to get it to
do what I think it should be able to do.
The only thing I can think of is to take the dataSet and figure out
how to pop each record out of it, one at a time, and insert it into
the list box with the Add method. (or AddRange if I can figure out
how to dump the contents of a dataSet to an array).
TIA
Malcolm
"Bother," said the Borg, "we just assimilated Pooh."