Hi all,,
I have a check box and 3 combo box.. when the check box checked that time only the combo box state change to enable.. when check box state is false combo gone disabled.. this validation work at client side
Script
Aspx
Combo box auto post back is true..
when i try to select a row of that combo box the combo box state changed to disable automatically..
but still the check box state has been checked.. why this happen like this..
Regards,
Prassin
I have a check box and 3 combo box.. when the check box checked that time only the combo box state change to enable.. when check box state is false combo gone disabled.. this validation work at client side
Script
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function EnableControl_3() {
var combo3 = $find("<%= RadCmbxSections.ClientID %>");
var combo4 = $find("<%= RadCmbxDepartment.ClientID %>");
var combo = $find("<%= RadCmbxEmployee.ClientID %>");
var checkbox = document.getElementById('<%= chkEmployee.ClientID %>');
if (checkbox.checked) {
combo.enable();
combo3.enable();
combo4.enable();
} else {
combo.disable();
combo3.disable();
combo4.disable();
}
}
</
script
>
Aspx
<
telerik:RadComboBox
runat
=
"server"
ID
=
"RadCmbxEmployee"
Height
=
"190px"
EmptyMessage
=
"Select supplier"
Width
=
"410px"
MarkFirstMatch
=
"true"
DataSourceID
=
"SqlDataSource2"
EnableLoadOnDemand
=
"true"
HighlightTemplatedItems
=
"true"
OnClientItemsRequested
=
"UpdateItemCountField"
OnDataBound
=
"RadCmbxEmployee_DataBound"
OnItemDataBound
=
"RadCmbxEmployee_ItemDataBound"
OnItemsRequested
=
"RadCmbxEmployee_ItemsRequested"
AutoPostBack
=
"True"
>
<
HeaderTemplate
>
<
ul
class
=
"rcbHovered"
>
<
li
class
=
"col1"
>Name</
li
>
<
li
class
=
"col2"
>Code</
li
>
<
li
class
=
"col3"
>ContactPerson</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<%#DataBinder.Eval(Container.DataItem, "Name")%></
li
>
<
li
class
=
"col2"
>
<%#DataBinder.Eval(Container.DataItem, "Code")%></
li
>
<
li
class
=
"col3"
>
<%#DataBinder.Eval(Container.DataItem, "ContactPerson")%></
li
>
</
ul
>
</
ItemTemplate
>
<
FooterTemplate
>
A total of
<
asp:Literal
runat
=
"server"
ID
=
"RadComboItemsCount"
/>
items
</
FooterTemplate
>
</
telerik:RadComboBox
>
Combo box auto post back is true..
when i try to select a row of that combo box the combo box state changed to disable automatically..
but still the check box state has been checked.. why this happen like this..
Regards,
Prassin