This is a migrated thread and some comments may be shown as answers.

selection out of range by Filter-template

8 Answers 396 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Booker
Top achievements
Rank 1
Booker asked on 12 May 2009, 09:43 AM

Hello,

 

i am using Telerik Version Q1 2009.

In my RadGrid is a filter like that:

 <telerik:GridTemplateColumn DataField="BETRIEBSNR" HeaderText="Betriebsnr" UniqueName="BETRIEBSNR">

            <FilterTemplate>

                <telerik:RadComboBox ID="RadComboBox1" DataSourceID="SDS_FILTER_BETRIEBSNR" DataTextField="BETRIEBSNR"

                 DataValueField="BETRIEBSNR" AppendDataBoundItems="true"

                 SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("BETRIEBSNR").CurrentFilterValue %>'

                 runat="server" OnClientSelectedIndexChanged="SelectedIndexChanged" EnableLoadOnDemand="true"

                  AllowCustomText="true" MarkFirstMatch="true">

                    <Items>

                        <telerik:RadComboBoxItem />

                    </Items>

                 </telerik:RadComboBox>

                

                 <telerik:RadScriptBlock ID="RadScriptsBlock1" runat="server">

                    <script type="text/javascript">

                        function SelectedIndexChanged(sender, args) {

                            var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");

                            tableView.filter("BETRIEBSNR", args.get_item().get_value(), "EqualTo");

                        }

                    </script>

                 </telerik:RadScriptBlock>

            </FilterTemplate>

            <ItemTemplate>

                <%#Eval("BETRIEBSNR")%>

            </ItemTemplate>

        </telerik:GridTemplateColumn> 

 

 

<asp:SqlDataSource ID="SDS_FILTER_BETRIEBSNR" runat="server"

                ConnectionString="<%$ ConnectionStrings:APPDB %>" SelectCommand="SELECT DISTINCT BETRIEBSNR FROM    BETRIEBE"></asp:SqlDataSource>

 

 

If I take an Item i’m getting this message:

 

Sys.WebForms.PageRequestManagerServerErrorException: Selection out of range

Parametername: value

Telerik.Web.UI.WebResource.axd Zeile:6

 

Thank you for your help! 

8 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 15 May 2009, 06:40 AM
Hello Booker,

I have prepared a small sample using a similar approach which works as expected on my end. Try it and let me know what is different in your case.

Kind regards,
Pavel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
omair
Top achievements
Rank 1
answered on 17 Jun 2009, 05:59 PM
I am experiencing similar problem. For the Radcombobox drop down filter when I select an option, I get same error:

Selection out of range parameter name: value

any suggestion?
0
Sebastian
Telerik team
answered on 22 Jun 2009, 02:31 PM
Hello Omair,

Have you compared your implementation with this presented in the following online demos of the product:

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx

Can you outline the differences between those cases and your configuration? They can lead us to the source of the problem to address it accordingly. You may also test the samples from the RadControls local installation on your machine residing in the following default location:

C:\Program Files\telerik\RadControls for ASPNET AJAX Q1 2009\Live Demos\Grid\Examples

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Steve Boulanger
Top achievements
Rank 1
answered on 25 Jun 2009, 05:52 PM
I got the same error when values in the combo box were capitalized but values in the table were not (even though the IsCaseSensitive property was set to false).  I changed the data to match the combo box values and all works fine now.
0
Yves
Top achievements
Rank 1
answered on 22 Mar 2010, 03:53 AM
I have the same error, but not on my developpement environnement, but only on my production server.

I use nested grid to display a big web form base on master detail structure and the 1st element of the list of master table return this error, but second item work fine.

My specific context, it was work on 2009Q2 trial version before I upgraded to 2009Q3 or 2010Q1 licenced version.

Maybe it because I need to update something on server, but what ?  Have any Idea ?

Thank!
0
Hamid
Top achievements
Rank 1
answered on 30 Jun 2011, 05:07 PM

I have the same issue with Filtering Template ("selection out of range!")
when I select a value from the RadComboBox FilteringTemplate it causes this error :
"Sys.WebForms.PageRequestManagerServerErrorException : Selection out of range    Parameter Name : value"

here is my code

<telerik:RadGrid ID="RadGrid1" Width="100%" AllowFilteringByColumn="True" AllowSorting="True"
    AllowPaging="True" PageSize="7" runat="server" AutoGenerateColumns="False" OnPreRender="RadGrid1_PreRender"
    ShowStatusBar="true" EnableLinqExpressions="false" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView DataKeyNames="ID">
        <Columns>
            <telerik:GridBoundColumn UniqueName="FileType" DataField="FileType" HeaderText="File Type"
                HeaderStyle-Width="200px">
                <FilterTemplate>
                    <telerik:RadComboBox ID="RadComboBoxFileType" DataTextField="FileType"
                        DataValueField="FileType" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("FileType").CurrentFilterValue %>'
                        runat="server" OnClientSelectedIndexChanged="FileTypeIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                        <script type="text/javascript">
                            function FileTypeIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("FileType", args.get_item().get_value(), "EqualTo");
  
                            }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="DummyValues" DataField="DummyValues" HeaderText="DummyValues" HeaderStyle-Width="200px">
                <FilterTemplate>
                    <telerik:RadComboBox ID="RadComboBoxDummy" DataTextField="DummyValues"
                        DataValueField="DummyValues" Height="100px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("DummyValues").CurrentFilterValue %>'
                        runat="server" OnClientSelectedIndexChanged="DummyValuesIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem Text="All" />
                        </Items>
                    </telerik:RadComboBox>
                    <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server">
                        <script type="text/javascript">
                            function DummyValuesIndexChanged(sender, args) {
                                var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                tableView.filter("DummyValues", args.get_item().get_value(), "EqualTo");
                            }
                        </script>
                    </telerik:RadScriptBlock>
                </FilterTemplate>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="FileName" DataField="FileName" HeaderText="File Name"
                AllowFiltering="false" HeaderStyle-Width="200px" />                  
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

I dont know where I made a mistake!!

I also attaching the screenshot of error
0
Milind Raje
Top achievements
Rank 1
answered on 14 Feb 2012, 09:47 PM
Has this been resolved? I am getting the same error. I have Version 2011.3.1350.40
Thanks
milind
0
Pavlina
Telerik team
answered on 20 Feb 2012, 09:54 AM
Hi,

I tried to replicate the problem you are facing but to no avail. Please find attached my test project which is working without errors and let me know if it helps to resolve the issue you are facing.

Regards,
Pavlina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Grid
Asked by
Booker
Top achievements
Rank 1
Answers by
Pavel
Telerik team
omair
Top achievements
Rank 1
Sebastian
Telerik team
Steve Boulanger
Top achievements
Rank 1
Yves
Top achievements
Rank 1
Hamid
Top achievements
Rank 1
Milind Raje
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or