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

Grid FilterTemplate error

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl Wilkens
Top achievements
Rank 1
Karl Wilkens asked on 11 Mar 2011, 05:59 PM
Hi, I am trying your demo code found here http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx
and used it as a starting point to add a RadComboBox of a column in my grid as shown here. The boldfaced line below throws an error in the browser - Compiler Error Message: BC30108: 'GridItem' is a type and cannot be used as an expression.

here is the code - any thoughts or help greatly appreciated.

<telerik:GridBoundColumn DataField="Difficulty" HeaderText="Difficulty" UniqueName="Difficulty">
                               <FilterTemplate>
                         <telerik:RadComboBox ID="rcbDifficulty" runat="server" OnClientSelectedIndexChanged="difficulty_changed" width="50px">
                         <Items>
                         <telerik:RadComboBoxItem Text="Beginner" value="Beginner"/>
                         <telerik:RadComboBoxItem Text="Intermediate" value="Intermediate"/>
                         <telerik:RadComboBoxItem Text="Advanced" value="Advanced"/>
                         </Items>
                         </telerik:RadComboBox>
                          <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">

                                <script type="text/javascript">
                                    function difficulty_changed(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        tableView.filter("Difficulty", args.get_item().get_value(), "EqualTo");

                                    }
                                </script>

                            </telerik:RadScriptBlock>
                         </FilterTemplate>
                        </telerik:GridBoundColumn>

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Mar 2011, 07:32 AM
Hello Karl,

I have found one forum which discusses the similar issue. Please go through it and see if it helps.
Grid filtering

Thanks,
Princy.
Tags
Grid
Asked by
Karl Wilkens
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or