RadGrid Filter with AutoPostBackOnFilter

3 posts, 0 answers
  1. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 03 Dec 2009 Link to this post

    Ok I have some very odd behavior with a radgrid.  I am trying to set it up so that it will filter the columns when the enter key is hit.  I have set up the gid and it never seems to acknowledge the enter key being pressed, but it will work when I hit the tab key.  I can live with this if necessary, but the odd thing is this.

    When the page loads I can filter the column, case sensitive, on whatever column I have set up with AutoPostBackOnFilter = true.  The issue is when I go to another column and try to filter it.  If it is not set to AutoPostBackOnFilter and use the GUI drop down it works.  But if I try and filter on another column with AutoPostBackOnFilter set to true the grid does not filter and blanks out the filter box when I tab off it.

     More odd behavior I can keep filter on whatever column I first filtered on with no issue, except when I do certain things, like try to filter on another column with the Autopost back set and then remove filter on a column without autopostback and then try to filter with my original column.  Then it does the same thing blanks the filter box and does not filter.

     It always filters if I do not use autopostback.  Here is some of the code.


     <telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"   
                        Skin="WebBlue" AllowFilteringByColumn="True" 
                        EnableTheming="False" onneeddatasource="RadGrid1_NeedDataSource"   
                   <HeaderContextMenu EnableTheming="True">                  
                   <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
                   <MasterTableView  DataKeyNames="ClientID">  
                      <HeaderStyle Width="20px"></HeaderStyle> 
                   <HeaderStyle Width="20px"></HeaderStyle> 
                       <telerik:GridBoundColumn DataField="ClientID" DataType="System.Int32"   
                           HeaderText="ClientID" ReadOnly="True" SortExpression="ClientID"   
                           UniqueName="ClientID" Visible="false">  
                       <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name"   
                           SortExpression="LastName" UniqueName="LastName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" > 
                       <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" 
                           SortExpression="FirstName" UniqueName="FirstName">  
                       <telerik:GridBoundColumn DataField="RecordAccountName" HeaderText="Account Name"   
                           SortExpression="RecordAccountName" UniqueName="RecordAccountName">  
                       <telerik:GridBoundColumn DataField="StrategyTypeDescription"   
                           HeaderText="Strategy" SortExpression="StrategyTypeDescription"   
                           UniqueName="StrategyTypeDescription" Groupable="true" GroupByExpression="StrategyTypeDescription, Sum(InitialInvestmentAmount) GroupTotal [Group Total]  Group By StrategyTypeDescription">  
                       <telerik:GridBoundColumn DataField="IntermediaryDescription"   
                           HeaderText="Intermediary" SortExpression="IntermediaryDescription"   
    That is some of the grid code

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
                RadGrid1.DataSource = ClientBLL.GetClientsNotInvested();  
            public static List<APAPortal.vw_clients_pending> GetClientsNotInvested()  
                APADataContext db = new APADataContext();  
                var query = from c in db.vw_clients_pendings  
                            select c;  
                return query.ToList();  
    Any ideas?  I have tried to set the grid with RadAjaxControl, and numerous other ways.

    Sorry just discoverd that it is using controls version 2008.3.1314.  This might be the issue

  2. Nikolay Rusev
    Nikolay Rusev avatar
    2287 posts

    Posted 09 Dec 2009 Link to this post

    Hello Eric,

    Can you please see whether you are still experience same behavior with latest version RadControls for ASP.NET AJAX? There are few improvements with RadGrid filtering with latest official release.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Eric Klein
    Eric Klein avatar
    183 posts
    Member since:
    Aug 2009

    Posted 09 Dec 2009 Link to this post

    Sorry I ment to repost.  When I used the new version it worked as expexted.  Looks like it was an issue with the old version of the controls.
Back to Top