i've tried to get an asp.net dropdownlist control to become a dijit combobox but it's not working.
i've tried this:
<asp:DropDownList ID="ddlUserID" dojoType="dijit.form.ComboBox" runat="server"
DataTextField="FullNameAndUserName"
CssClass="stdtext" DataValueField="UserID" AppendDataBoundItems="True"
AutoPostBack="True"
meta:resourcekey="ddlUserIDResource1" EnableTheming="False">
<asp:ListItem Text="(All Users)" Value="0" meta:resourcekey="ListItemResource1" />
</asp:DropDownList>
<script type="text/javascript" src="../scripts/dojo/dojo.js"></script>
<script type="text/javascript">
dojo.require('dijit.form.ComboBox');
</script>
the path to dojo.js is relative to the containing parent page of the ascx control and loads fine according to firebug.
the rendered html is this:
<select id="invoiceReport1_ddlUserID" class="stdtext" dojotype="dijit.form.ComboBox" onchange="javascript:setTimeout('__doPostBack(\'invoiceReport1$ddlUserID\',\'\')', 0)" name="invoiceReport1$ddlUserID">
</select>
<script src="../scripts/dojo/dojo.js" type="text/javascript">
</script>
<script type="text/javascript">
</script>
<script type="text/javascript">
looking at the examples from http://docs.dojocampus.org/dijit/form/ComboBox i cant see why the resulting select tag is not a combobox.
i've also tried this:
HtmlGenericControl ctrl1 = new HtmlGenericControl("Script");
ctrl1.Attributes.Add("Type", "Text/Javascript");
ctrl1.Attributes.Add("src", "../Scripts/dojo/dojo.js");
this.Page.Header.Controls.Add(ctrl1);
HtmlGenericControl ctrl2 = new HtmlGenericControl("Script");
ctrl2.Attributes.Add("Type", "Text/Javascript");
ctrl2.InnerText = "dojo.require('dijit.form.ComboBox');";
this.Page.Header.Controls.Add(ctrl2);
Any suggestions?