[RESOLVED] [2005] data binding issue
Hi all
I have two comboboxes on a form, both with the same datatable object as their Datasource. when i select an item in one of the boxes, the other box also jumps to that item. They need to be exclusive... a change to one cannot make a change to the other. To resolve this, i tried making a function that returns a clone of a datatable with all of its rows imported, and setting the second combobox's datasource to the output of this function, sending the function the original datatable as input. for some reason, when i add a row to the datatable, and reset the databind on the second combobox by setting it to the datatable replication function's output, the changes do not show up in the combobox.
Is there another way to make two controls set to the same datasource exclusive? (without physically looping through the datarows one at a time and assigning the string values to the combobox)
Re: [2005] data binding issue
Re: [2005] data binding issue
Why not just load the data into the combo boxes separately without binding them to a data source ?
Re: [2005] data binding issue
because i have a valuemember and a displaymember.
i want the combobox to display a name of a formula in the drop down, and return a value string representing a formula you are selecting by name.
if i loop through and load the data in like you are suggesting, i will need to do a table.Select() function to find the function i am looking for.
also, it will be messier code.
Re: [2005] data binding issue
what you could do is load it into one, and then transpose it from the first to the second without binding the second one..
just throwing out some ideas.
Re: [2005] data binding issue
that might work. i resolved to use two seperate datatables. not an overhead issue, because the data list is relatively small.
thanks for your help.