PDA

View Full Version : optgroup in GXT



jennygandra
16 Aug 2009, 11:32 PM
Hi,
I want the optgroup in GXT combobox. Is there any component that provides this functionality.

some what like
<select>
<optgrouplabel="US State">
<optionvalue="Alaska">Alaska</option>
<optionvalue="California">California</option>
<optionvalue="New Jersey">New Jersey</option>
<optionvalue="Washington">Washington</option>
</optgroup>
<optgrouplabel="India">
<optionvalue="Punjab">Punjab</option>
<optionvalue="Kerala">Kerala</option>
<optionvalue="Rajasthan">Rajasthan</option>
<optionvalue="Maharashtra">Maharashtra</option>
</optgroup>
</select>

Thanks in advance.

sven
16 Aug 2009, 11:58 PM
You can do something like this was is change of the custom template of the combo.

jennygandra
17 Aug 2009, 1:07 AM
Thanks for you reply.

But I have problem with the selection aand style.The optgroup header should come in bold.The optgroup should not be selected on mouse over.How will I achevie this?
I am populating the combobox from a listview.So what model should I use for this.
And I also want a optgroup with a list of options,below it I want another optgroup, how can I do this?
If possible can you plz post a custom template inplementation for this.

Thanks in advance.