Hello everyone, I have one problem with RadComboBox and will appreciate any help. I'm using 2013.1.403.40 version with v4.0.30319 runtime in my ASP.NET application. So, here is my solution: combobox on the page, that is populated from server side.
So, 6 items will appear on client side (3 separators and 3 simple items). I've also attached event handler for OnClientItemChecked with folowing logic:
And here is my problem: for example, before sender.set_text operation, text was "2 items checked". Right after sender.set_text it will change to "my custom..." (as desired).
But after exiting from event handler, text will return to it's previous state ("2 items checked"). It seems, that another event fires right after
OnClientItemChecked.
So my desired behaviour, is to change text in radcombobox after user was (un)checked random item. It is possible, or by now, this is not achievable ?
Thank you in advance.
<
telerik:radcombobox
id
=
"cmbBox"
runat
=
"server"
width
=
"185px"
DataTextField
=
"Text"
DataValueField
=
"Value"
DataCheckedField
=
"IsChecked"
MaxHeight
=
"185px"
CheckBoxes
=
"True"
EnableCheckAllItemsCheckBox
=
"True"
Filter
=
"None"
Sort
=
"None"
EnableTextSelection
=
"False"
OnClientItemChecked
=
"cmbBoxItemChecked"
/>
cmbBox.Items.Add(
new
RadComboBoxItem(
"separator1"
) { IsSeparator =
true
});
cmbBox.Items.Add(
new
RadComboBoxItem
{ Text =
"Name1"
, Value =
"Value1"
, Checked =
false
});
cmbBox.Items.Add(
new
RadComboBoxItem(
"separator2"
) { IsSeparator =
true
});
cmbBox.Items.Add(
new
RadComboBoxItem
{ Text =
"Name2"
, Value =
"Value2"
, Checked =
false
});
cmbBox.Items.Add(
new
RadComboBoxItem(
"separator3"
) { IsSeparator =
true
});
cmbBox.Items.Add(
new
RadComboBoxItem
{ Text =
"Name3"
, Value =
"Value3"
, Checked =
false
});
function
cmbBoxItemChecked(sender, eventArgs)
{
sender.set_text(
"my custom text according to internal logic, based on checked item"
);
}
But after exiting from event handler, text will return to it's previous state ("2 items checked"). It seems, that another event fires right after
OnClientItemChecked.
So my desired behaviour, is to change text in radcombobox after user was (un)checked random item. It is possible, or by now, this is not achievable ?
Thank you in advance.