Filtering on tab or lost focus

2 posts, 0 answers
  1. Joseph Baker
    Joseph Baker avatar
    17 posts
    Member since:
    Jul 2006

    Posted 06 Mar 2009 Link to this post

    I have a radgrid that uses gridboundcolumns with filtering.  I need to be able to automatically filter "contains" when the user tabs out of the filter box (or focus is lost to the filter box).  I've searched but can't seem to find a solution.  Any help would be greatly appreciated.
    Here is the grid, just in case it's needed:
            <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataRamps" GridLines="None">  
                <PagerStyle Mode="NextPrevNumericAndAdvanced" ShowPagerText="true" /> 
                <MasterTableView DataSourceID="SqlDataRamps" PageSize="15">  
                    <RowIndicatorColumn Visible="False">  
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    <ExpandCollapseColumn Visible="False" Resizable="False">  
                        <HeaderStyle Width="20px"></HeaderStyle> 
                        <telerik:GridBoundColumn DataField="TRANSFER_POINT_ID" HeaderText="Ramp ID" SortExpression="TRANSFER_POINT_ID" 
                            UniqueName="TRANSFER_POINT_ID" Display="False" Resizable="False">  
                        <telerik:GridBoundColumn DataField="NAME" HeaderText="Ramp Name" SortExpression="NAME" 
                            <FooterStyle Width="225px" /> 
                            <HeaderStyle Width="225px" /> 
                            <ItemStyle Width="225px" /> 
                        <telerik:GridBoundColumn DataField="CITY" HeaderText="City" SortExpression="CITY" 
                            <FooterStyle Width="100px" /> 
                            <HeaderStyle Width="100px" /> 
                            <ItemStyle Width="100px" /> 
                        <telerik:GridBoundColumn DataField="STATE" HeaderText="State" SortExpression="STATE" 
                            <FooterStyle Width="50px" /> 
                            <HeaderStyle Width="50px" /> 
                            <ItemStyle Width="50px" /> 
                        <telerik:GridBoundColumn DataField="STATION_CODE" HeaderText="Station" SortExpression="STATION_CODE" 
                            <FooterStyle Width="50px" /> 
                            <HeaderStyle Width="50px" /> 
                            <ItemStyle Width="50px" /> 
                        <telerik:GridBoundColumn DataField="CARRIER_NAME" HeaderText="Carrier" SortExpression="CARRIER_NAME" 
                            <FooterStyle Width="225px" /> 
                            <HeaderStyle Width="225px" /> 
                            <ItemStyle Width="225px" /> 
                        <PopUpSettings ScrollBars="None"></PopUpSettings> 
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">  
                    <Selecting AllowRowSelect="True" /> 
                    <ClientEvents OnRowSelected="RowSelected" OnRowDblClick="RowDblClick" /> 

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 Mar 2009 Link to this post

    Hi Joseph,

    Set the AutoPostBackOnFilter  property to true for the Grid column. And also set the CurrentFilterFunction to Contains to achieve the desired scenario.
    Search on key press/button click


  3. DevCraft R3 2016 release webinar banner
Back to Top