COMBO BOX DISTINCT RECORDS

Can anyone Knows How to show distinct records in Combo box with data control

Thanks

[96 byte] By [RANGERAZIZ] at [2007-12-24]
# 1

If your using the data binding for the combobox then you should do something like

Dim d3 As DataTable = dt.DefaultView.ToTable(True, "City")

To create a new datatable which is based upon the Unique city fields in a datatable called dt.

The result is a datatable called d3 which contains only unique city fields and which you can then use for you databinding by setting as the datasource property of the combobox.

spotty at 2007-8-31 > top of Msdn Tech,Visual Basic,Visual Basic Language...