I have a column that is set as a dropdownlist type. How do I bind that dropdownlist to a datasource. I have tried 'column.valuelist.datasource = dataset', but nothing shows up, even when I click on a cell. I am doing all this programmatically. The only thing that is not programmatically is the column which I created in the designer.
eware said:I have tried 'column.valuelist.datasource = dataset'
You also need to set:
column.ValueList.DataMember = MyDropDownTablecolumn.ValueList.DisplayMember = MyDropDownTextColumncolumn.ValueList.ValueMember = MyDropDownValueColumn
where MyDropDownTable is the name of the table containing the dropdown data*, MyDropDownTextColumn is the name of the column containing the text options to be displayed in the dropdown, and MyDropDownValueColumn is the name of the column containing the values to be returned.
* or you could use:
column.valuelist.datasource = dataset.tables(N)