PDA

View Full Version : How do I transform a select to an Ext combo?



parky128
14 Dec 2010, 7:48 AM
Hi,

I have a select list like so:


<select id="ddlTimespan" >
<option value="custom">Custom</option>

<optgroup label="Day">
<option value="yesterday">Yesterday</option>
<option value="today">Today</option>
<option value="last7">Last 7 Days</option>
<option value="last30">Last 30 Days</option>
<option value="last60">Last 60 Days</option>
<option value="last90">Last 90 Days</option>
<option value="last120">Last 120 Days</option>
</optgroup>

<optgroup label="Week">
<option value="lastweek">Last Week</option>
<option value="thisweek" selected="selected">This Week</option>
</optgroup>

<optgroup label="Month">
<option value="lastmonth">Last Month</option>
<option value="thismonth">This Month</option>
<option value="lastthismonth">This and Last Month</option>
</optgroup>

<optgroup label="Year">
<option value="cury">Current Year</option>
<option value="prevy">Last Year</option>
<!--<option value="prev2y">Last 2 Years</option>-->
<option value="prevcury">This and Last Year</option>
<option value="prevcur2y">This and Last 2 Years</option>
</optgroup>

</select>
I have seen some posts on transforming markup to their Ext equivalents, but am having trouble finding how to do this with a select list. Can someone please enlighten me?

Note that this is also a grouped select list, can a combo display grouped options?

Thanks,
Rob