Hello
I am filling my combobox with data in this manner (I can see the DataTextField)
| EntityType[] entityTypes = WritingPresenter.GetEntityTypes(); |
| this.ddlType.DataSource = entityTypes; |
| this.ddlType.DataTextField = "Type"; |
| this.ddlType.DataValueField = "GUID"; |
| this.ddlType.DataBind(); |
I am trying to retrieve the selectedvalue via Javascript by doing this:
| var combo = <%=ddlType.ClientID %>; |
| returnVals.type = combo.get_value(); |
However, when the javascript runs, I get a Microsoft JScript runtime error: Object doesn't support this property or method when it tries to get the value.
Interestingly, if I look at the html that gets generated, I do not see the dataValue:
| <div class="rcbSlide" style="z-index:6000;"> |
| <div id="ddlType_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="float:left;display:none;"> |
| <div class="rcbScroll rcbWidth" style="width:100%;"> <ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"> |
| <li class="rcbItem ">Passport</li> |
| <li class="rcbItem ">Individual</li> </ul> |
| </div> |
| </div> |
| </div> |
| <input id="ddlType_ClientState" name="ddlType_ClientState" type="hidden" /> |
Here is the markup from the aspx page:
| <telerik:RadComboBox ID="ddlType" runat="server" Width="100%"> |
| </telerik:RadComboBox> |
Do I need a few more properties on my RadComboBox to get this working?