thsman
Posts: 27
|
| Posted: 02/18/2012, 10:20 AM |
|
Is there a way to remove or hide duplicates in a listbox without code? If code is needed where should it go? I'm currently using asp
|
 |
 |
thsman
Posts: 27
|
| Posted: 02/18/2012, 5:25 PM |
|
I didn't work it out but found a better way to do what I wanted.
|
 |
 |
andy
Posts: 183
|
| Posted: 02/19/2012, 10:16 AM |
|
On the Data tab of the Listbox Properties
Change Data Source Type to SQL
Create an SQL SELECT query that includes the bound column (id key field) and the Text column (descriptive value) and make it DISTINCT
Example:
SELECT DISTINCT idfield, textfield FROM mytable
Then your idfield will be available to select for the Bound Column and the textfield for the Text Column.
If you use your own SQL statements for listboxes, you can do all kinds of interesting things such as concatenating fields to create rich Text Column descriptions.
Hope that helps.
_________________
Andy
RAD tools for rich UI controls:
http://www.koolphptools.com |
 |
 |
|