i'm cascading dropdownbox (radcombobox) with clientdatasource but i'm a having challenges when changing the main combobox in hopes of having oncustomparameter to fire again.
ComboBox
<
telerik:RadComboBox
runat
=
"server"
EmptyMessage
=
"Function"
ID
=
"RcbFun"
Width
=
"80px"
OnClientLoad
=
"Rcb_OnClientLoad"
DataTextField
=
"Code"
DataValueField
=
"Functions"
AppendDataBoundItems
=
"True"
ClientDataSourceID
=
"CdsFunc"
ItemsPerRequest
=
"15"
Filter
=
"Contains"
EnableLoadOnDemand
=
"true"
ShowMoreResultsBox
=
"true"
EnableVirtualScrolling
=
"true"
OnClientSelectedIndexChanged
=
"Rcb_OnClientSelectedIndexChanged"
></
telerik:RadComboBox
>
<
telerik:RadComboBox
runat
=
"server"
EmptyMessage
=
"Sub-Function"
ID
=
"RcbSubF"
Width
=
"80px"
OnClientLoad
=
"Rcb_OnClientLoad"
DataTextField
=
"Code"
DataValueField
=
"SubFunction"
AppendDataBoundItems
=
"True"
ClientDataSourceID
=
"CdsSubF"
ItemsPerRequest
=
"15"
Filter
=
"Contains"
HighlightTemplatedItems
=
"true"
OnClientSelectedIndexChanged
=
"Rcb_OnClientSelectedIndexChanged"
EnableLoadOnDemand
=
"true"
></
telerik:RadComboBox
>
RadClientDataSource
<
telerik:RadClientDataSource
ID
=
"CdsFunc"
runat
=
"server"
>
<
DataSource
>
<
WebServiceDataSourceSettings
BaseUrl
=
"LibraryService.svc/"
>
<
Select
Url
=
"GetFunctions"
DataType
=
"JSON"
RequestType
=
"Get"
ContentType
=
"application/json; charset=utf-8"
/>
</
WebServiceDataSourceSettings
>
</
DataSource
>
<
Schema
DataName
=
"d"
>
</
Schema
>
</
telerik:RadClientDataSource
>
<
telerik:RadClientDataSource
ID
=
"CdsSubF"
runat
=
"server"
>
<
ClientEvents
OnCustomParameter
=
"ParamMap"
/>
<
DataSource
>
<
WebServiceDataSourceSettings
BaseUrl
=
"LibraryService.svc/"
>
<
Select
Url
=
"RcbGetSubFunctions"
DataType
=
"JSON"
RequestType
=
"Get"
ContentType
=
"application/json; charset=utf-8"
/>
</
WebServiceDataSourceSettings
>
</
DataSource
>
<
Schema
DataName
=
"d"
></
Schema
>
</
telerik:RadClientDataSource
>
OnCustomParameter Method
1.
function
ParamMap(sender, args) {
2.
if
(RcbFun.get_value() !=
""
) {
3.
if
(args.get_type() ==
"read"
&& args.get_data()) {
4.
args.set_parameterFormat({ paramFunction: RcbFun.get_value() });
5.
}
6.
}
7.
}
Loading items into RcbSubF after selecting the a value RcbFun for the first time is not a problem. The issues lies in selecting another value in RcbFun. The OnCustomParameter event "ParamMap" will not fire again. Any suggestion?
Please be advised that these controls are in side a RadPanelBar.