I have a RadGrid with a Details Table that is using a RadComboBox in the FilterTemplate. The RadComboBox get populated correctly and it works correctly filtering one Details Table.
But as soon as I set that one filter and go to expand a different Details Table, I'm getting an error.
Selection out of range
Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value
I'm going to guess that is because I am attempting to populate the RadComboBox uniquely for each Details Table so that it only contains values in the data source for that Details Table. Is what I'm trying to achieve possible? Or does the datasource for the RadComboBox filter need to be the same in all the Details Tables.
<
telerik:GridTemplateColumn
HeaderText
=
"State"
SortExpression
=
"State_cd"
UniqueName
=
"State_cd"
ShowFilterIcon
=
"True"
DataField
=
"State_cd"
CurrentFilterFunction
=
"EqualTo"
AutoPostBackOnFilter
=
"True"
>
<
ItemTemplate
>
<
asp:Label
runat
=
"server"
ID
=
"lblState"
Text='<%# Eval("State_cd") %>'></
asp:Label
>
</
ItemTemplate
>
<
FilterTemplate
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"rcbState"
DataTextField
=
"State_cd"
DataValueField
=
"State_cd"
AppendDataBoundItems
=
"true"
RenderingMode
=
"Simple"
EnableEmbeddedSkins
=
"False"
Skin
=
"2015"
SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("State_cd").CurrentFilterValue %>'
OnClientSelectedIndexChanged="State_Changed" OnInit="rcbState_Init">
<
Items
>
<
telerik:RadComboBoxItem
Text
=
"All"
/>
</
Items
>
</
telerik:RadComboBox
>
<
telerik:RadScriptBlock
ID
=
"RadScriptBlock2"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function State_Changed(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
var strState = args.get_item().get_value();
tableView.filter("State_cd", strState, "EqualTo");
}
</
script
>
</
telerik:RadScriptBlock
>
</
FilterTemplate
>
</
telerik:GridTemplateColumn
>
But as soon as I set that one filter and go to expand a different Details Table, I'm getting an error.
Selection out of range
Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value
I'm going to guess that is because I am attempting to populate the RadComboBox uniquely for each Details Table so that it only contains values in the data source for that Details Table. Is what I'm trying to achieve possible? Or does the datasource for the RadComboBox filter need to be the same in all the Details Tables.