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

RadGrid FilterTemplate RadCombo SelectedIndexChanged not firing

7 Answers 206 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rich Helferty
Top achievements
Rank 1
Rich Helferty asked on 24 Nov 2010, 07:55 PM
The RadGrid FilterTemplate RadCombo SelectedIndexChanged not firing in the code below. Am I missing something?


<telerik:RadGrid ID="gridVers" runat="server"
AutoGenerateColumns="False"
OnItemDataBound="GridVers_ItemDataBound"
Width="960px" AllowSorting="True" 
 OnItemCommand="GridVers_ItemCommand" OnNeedDataSource="GridVers_NeedDataSource" EnableViewState="true" AllowFilteringByColumn="true" OnItemCreated="gridVers_OnItemCreated" OnSortCommand="GridVers_SortCommand"   GridLines="None" >
   <MasterTableView DataKeyNames="VerbatimId" TableLayout="Fixed" UseAllDataFields="true">
            <Columns>
            <telerik:GridBoundColumn UniqueName="VerbatimMarked" AllowFiltering="true" DataField="IsMarkedDisplay" HeaderText="Marked">
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="50px" HorizontalAlign="Center" Font-Underline="true" />
                <FilterTemplate>
                <telerik:RadComboBox runat="server" Width="50px" ID="rcbFilterMarked"></telerik:RadComboBox>
                </FilterTemplate>
            </telerik:GridBoundColumn>
             
             <telerik:GridTemplateColumn  UniqueName="VerbatimId" AllowFiltering="true"  SortExpression="VerbatimId" HeaderStyle-Width="75px" HeaderText="ID" DataField="VerbatimId">      
             
                                <FilterTemplate>
                                <telerik:RadComboBox runat="server" Width="75px" ID="rcbFilterLinkId"></telerik:RadComboBox>
                                </FilterTemplate>
                                <ItemTemplate>
                                <asp:LinkButton ID="lnkVerbatim" style="text-decoration: underline;"  CommandName="DetailVerbatim" runat="server" Text='<%# Eval("VerbatimId")%>'>
                                </asp:LinkButton>
                                </ItemTemplate>
             </telerik:GridTemplateColumn
             <telerik:GridBoundColumn UniqueName="VerbatimText" AllowFiltering="true"
                    DataField="VerbatimText" HeaderText="Verbatim"
                    DataType="System.String" >
               <FilterTemplate>
                <asp:TextBox runat="server" ID="txtFilterText"></asp:TextBox>
               </FilterTemplate>    
                      
                </telerik:GridBoundColumn>
             <telerik:GridBoundColumn  UniqueName="Specialty" AllowFiltering="true"
                    HeaderStyle-Width="60px" DataField="Specialty" HeaderText="Spec"
                    DataType="System.String" >
                    <FilterTemplate>
                        <telerik:RadComboBox runat="server" Width="60px" ID="rcbFilterSpec"></telerik:RadComboBox>
                    </FilterTemplate>
                </telerik:GridBoundColumn>
             <telerik:GridBoundColumn  UniqueName="ContactDate" AllowFiltering="true"
                    HeaderStyle-Width="80px" DataField="ContactDate" HeaderText="DT"
                    DataFormatString="{0:MM/dd/yyyy}" DataType="System.DateTime" >
                    <FilterTemplate>
                        <telerik:RadComboBox runat="server" Width="80px" ID="rcbFilterContact"></telerik:RadComboBox>
                    </FilterTemplate>
                </telerik:GridBoundColumn>
                 
                 
             <telerik:GridBoundColumn  UniqueName="State" AllowFiltering="true"
                    HeaderStyle-Width="30px" DataField="State" HeaderText="State"
                    DataType="System.String"  >
                       <FilterTemplate>
                        <telerik:RadComboBox runat="server" Width="30px" ID="rcbFilterState" AutoPostBack="true"  OnSelectedIndexChanged="FilterCombo_SelectedIndexChanged"></telerik:RadComboBox>
                    </FilterTemplate>
                      
                </telerik:GridBoundColumn>
            </Columns>
   </MasterTableView>        
    <ClientSettings EnableRowHoverStyle="true" >
        <Scrolling AllowScroll="True" ScrollHeight="400px" UseStaticHeaders="True" />
        <ClientEvents OnGridCreated="GridCreated" />
         
    </ClientSettings>
   </telerik:RadGrid>

7 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 25 Nov 2010, 05:11 PM
Hi Rich,

I tried to replicate the issue which you described, but to no avail.
Attached to this message, you will find the code which I used for testing.

Please, take a look at it and let me know if there are any differences at your ends, which I may be leaving out.

All the best,
Pavlina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Rohan
Top achievements
Rank 1
answered on 15 Feb 2012, 08:20 AM
Hi Pavlina ,
I have dynamically  generated template filed for FilterTemplate with RadComboBox for Radgrid , how to get filter expression from the RadComboBox .
0
Pavlina
Telerik team
answered on 20 Feb 2012, 10:00 AM
Hi Rohan,

Can you post the template definition, so that we can see if the combo is properly wired up to the filtering in RadGrid?

Also make sure that RadGrid is initialized on Page_Init and not on Page_Load.

Kind 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 >>
0
Rohan
Top achievements
Rank 1
answered on 20 Feb 2012, 10:33 AM
Hi Pavlina ,

Thanks for replay .. Issues of solved . i want to implement multiple column filter .How can i do this .
once again thanks for replay .
0
Pavlina
Telerik team
answered on 22 Feb 2012, 07:14 PM
Hello Rohan,

To achieve the desired functionality you can use our RadFilter control. Please refer to the link below for a live example:
http://demos.telerik.com/aspnet-ajax/filter/examples/integration/defaultcs.aspx?product=filter

Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rohan
Top achievements
Rank 1
answered on 23 Feb 2012, 05:19 AM
Hi Pavlina
Thanks for replay ,,,, once again thanks for guidance ...... is  any video link  to learn about TELERIK controls.
0
Shinu
Top achievements
Rank 2
answered on 23 Feb 2012, 06:04 AM
Hello,

Check the following link.
http://tv.telerik.com/products/aspnet-ajax.

-Shinu.
Tags
Grid
Asked by
Rich Helferty
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Rohan
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or