Hi,
I'm using RadCombobox Ajax control ,I have 2 combo box the second one fills programmatically on OnClientDropDownOpening event according to the first combo's selected item ,
It works properly but sometimes The 2nd combo dropdownlist become very small and scroll ,Here is my code :
Markup:
runat="server" OnClientSelectedIndexChanged="cmbDescription_onClinetSelectedIndexChanged" OnClientDropDownOpening="cmbDescription_OnClientDropDownOpening" >
I'm using RadCombobox Ajax control ,I have 2 combo box the second one fills programmatically on OnClientDropDownOpening event according to the first combo's selected item ,
It works properly but sometimes The 2nd combo dropdownlist become very small and scroll ,Here is my code :
Markup:
<telerik:RadComboBox
ID="cmbDescription" Filter="StartsWith" AllowCustomText="true"
MaxLength="256" Style="margin-right: 1px" runat="server" OnClientSelectedIndexChanged="cmbDescription_onClinetSelectedIndexChanged" OnClientDropDownOpening="cmbDescription_OnClientDropDownOpening" >
javascript:
function cmbDescription_OnClientDropDownOpening(sender, args) {
var tempSLRef = grdVoucherItems.get_tempEntity().SLRef;
if (currentSLRef !== tempSLRef) {
currentSLRef = tempSLRef;
PageMethods.FetchAllSLStandardDescBySLID(currentSLRef, AjaxFetchAllSLStandardDescSucceeded, OnPageMethodFailed, null);
}
}
function AjaxFetchAllSLStandardDescSucceeded(result, context) {
lstSlStandardDescs = result;
cmbDescription.get_items().clear();
for (var i = 0; i < lstSlStandardDescs.length; i++) {
var comboItem = new Telerik.Web.UI.RadComboBoxItem();
comboItem.set_text(lstSlStandardDescs[i].Item1);
comboItem.set_value(lstSlStandardDescs[i].Item3);
cmbDescription.trackChanges();
cmbDescription.get_items().add(comboItem);
cmbDescription.commitChanges();
}