This is a migrated thread and some comments may be shown as answers.

Issues with dropdownlist in IE

2 Answers 31 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Saju Samuel
Top achievements
Rank 1
Saju Samuel asked on 27 May 2014, 06:18 PM
Hi Telerik team:

I'm currently using DropDownList with checkboxes on javascript and I found out that method get_checked, that retrieves wether an item is checked or not
does not work on IE.
Exists some fix to use this method on IE? 

Any help would be appreciated.
Thanks.


function doSaveReport(id) {

            if ($("#txtSaveAs").val() == "" && id == "")
                alert("You must specify a name for the report definition");
            else {
            
                      oEmployee = $find("<%= ddlEmployees.ClientID %>").get_items(),
                        
                var ReportData = {                  
                    EmployeeId: []
                }   
           
                for (i = 0; i < oEmployee.get_count(); i++) {
                    item = oEmployee.getItem(i);
                    if (item.get_checked())
                        ReportData.EmployeeId.push(item.get_value());
                }
}

























2 Answers, 1 is accepted

Sort by
0
Saju Samuel
Top achievements
Rank 1
answered on 27 May 2014, 06:20 PM
I forgot to add the dropdown html code...

  <telerik:RadComboBox ID="ddlEmployees" runat="server" EnableCheckAllItemsCheckBox="true" 
                   CheckBoxes="true"  Width="250px"></telerik:RadComboBox>
0
Shinu
Top achievements
Rank 2
answered on 28 May 2014, 05:19 AM
Hi Saju Samuel,

Please do the following modification in your  JavaScript which works fine at my end.

JavaScript:
function doSaveReport() {
    var oEmployee = $find("<%= ddlEmployees.ClientID %>").get_items();
    for (var i = 0; i < oEmployee.get_count(); i++) {
        if (oEmployee.getItem(i).get_checked()) {
          //your code
      }
    }
}

Thanks,
Shinu.
Tags
DropDownList
Asked by
Saju Samuel
Top achievements
Rank 1
Answers by
Saju Samuel
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or