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

Filter Template On Nested Grid

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Muhammad
Top achievements
Rank 1
Muhammad asked on 12 Jul 2011, 02:09 PM
Hi,

I am using Telerik Nested Grid and I have applied filter template for one of my colmns and that's work fine for me but the problem is that after filtering when I click on a button to see my nested view template it doesn't open. Any Help would be greatly appreciated.

<telerik:GridTemplateColumn HeaderText="Shop Name" UniqueName="PortalID" DataField="PortalID"
                    SortExpression="PortalID">
                    <ItemTemplate>
                        <asp:Image ID="imgPortal" runat="server" ImageAlign="AbsBottom" />
                        <asp:Label ID="lblPortalName" runat="server" Text='<%# Eval("PortalID") %>'></asp:Label>
                    </ItemTemplate>
                    <FilterTemplate>
                        <telerik:RadComboBox ID="rcbPortal" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("PortalID").CurrentFilterValue %>'
                            runat="server" OnClientSelectedIndexChanged="TitleIndexChanged" DataTextField="PortalName" DataValueField="PortalID" >
                            <Items>
                                <telerik:RadComboBoxItem Text="All" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                            <script type="text/javascript">
                                function TitleIndexChanged(sender, args) {
                                    var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");                                   
                                    tableView.filter("PortalID", args.get_item().get_value(), "EqualTo");
 
                                }
                            </script>
                        </telerik:RadScriptBlock>
                    </FilterTemplate>
                </telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Genti
Telerik team
answered on 15 Jul 2011, 03:41 PM
Hi Muhammad,

Judging by the piece of code that you provided it is hard to find the error.
Can you try running the program in debug mode and see if some error pops-up.
Also, make sure that you disable Ajax for testing purposes.

If everything goes fine on the server side, check the client side if you have any Javascript exceptions.


Greetings,
Genti
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Muhammad
Top achievements
Rank 1
Answers by
Genti
Telerik team
Share this question
or