data binding of the combobox using dataview

how to set the data binding of the combobox using dataview, I mean which property to use Items,Text..etc i am trying ListBox2.DataBindings.Add("SelectedValue", dataview, "columnName") its is not displaying any data.I just wish to populate the Listbox using filtered records

1 Reply

AR Anupama Roy Syncfusion Team April 28, 2006 06:04 AM UTC

Hi Anon, We assume that you are working with our Syncfusion control. In your code snippet,I can see that you have used SelectedValue property.Along with this,have you set the ValueMember property? Please take a look at the code snippet: this.comboBoxBase1.ListControl.DataSource =dataview; this.comboBoxBase1.ListControl.ValueMember = "ColumnName"; this.comboBoxBase1.ListControl.DataBindings.Add("SelectedValue",dataview,"ColumnName"); The same code applies to a ListBox also: this.listBox2.DataSource =dataview; this.listBox2.ValueMember ="ColumnName"; this.listBox2.DataBindings.Add("SelectedValue",dataview,"ColumnName"); Please let us know if you have any difficulties. Thanks, Anu.

Loader.
Up arrow icon