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

Combobox with checkbox, oncheckbox selected combo text is not updated in Chrome

1 Answer 49 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 07 May 2012, 10:10 AM
Hi,

I am using combobox with checkbox for multiple selection. I am showing the selected text on checkbox selection and saving the selections next time that will be auto select. this is working fine in IE7,IE8 and mozila. But not working in Chrome. It showing error that "Uncaught TypeError: Cannot call method 'set_text' of null".

The code is as below when i am showing the selected text on the basis of previous selection

javascript:setTimeout("$(document).ready(function() { SetHeaderComboText('ucSearchBuilder_grdFilter_ctl00_ctl06_ddlFilterHeaderwithTreeView','Conflict Resolution');});",100);


Although i had tried $(document).ready() but it also not works with chrome.

comboIds
is redcombobox id and values are text to be display in radcomdobox
function SetHeaderComboText(comboIds, values) {
var arrcomboId = comboIds.toString().split('<');
var arrvalue = values.toString().split('<');
for (var j = 0; j < arrcomboId.length; j++) {
var comboId = arrcomboId[j];
var text = arrvalue[j];
var comboBox = $find(comboId);

//set the text of combobox
if (text.length > 0) {
//set the text of the combobox
comboBox.set_text(text);
}
else {
//all checkboxes are unchecked so reset the controls
comboBox.set_text("");
}
}
}

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 09 May 2012, 12:20 PM
Hi Manish,

Try calling the SetHeaderComboText in the event handler function of the load event:
Sys.Application.add_load(function(){SetHeaderComboText(params);});

Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Manish
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or