on 03-18-2005 2:49 PM
Hi
Does anyone know how to use dropdowns as table cell editors. I need to create a table where some of the columns have dropdowns as the editor and some don't.
I can create the dropdown(by index) by binding a node to the table(the DD list) and binding a subnode-attribute as the text val but that gives me the same list in all rows. As this is bound to the table and not the column all drop downs would have the same data in the DD list
Different dropdown-lists in one table column:
Let X be the view context node used as the table's data source. Add to X a (non-singleton) subnode Y with an attribute A containing the texts you want to display in your drop-down list boxes. Use an IWDDropDownByIndex as table cell editor, bind its "texts"-property to attribute A.
Armin
Message was edited by: Armin Reichert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
cheers guys and thanks armin, that did the trick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what we do for dropdowns that need different values according to the selected row.
1. Use a DropDownByKey as the table cell editor.
2. Use the getModifiableSimpleValueSet() API call to modify the values attached to the dropdown on every row selection event.
We don't have the case where you wouldn't actually have an editor, but you can disable the dropdown if the list is empty, which accomplishes the same effect.
Beware that if your keys and values are different, the keys not in the current dropdown will not show up correctly on the other rows.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is quite unclear do you need
different DD lists for different rows
or
different DD lists for different columns
Could you clarify?
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.