Standard filter problem

2 posts, 0 answers
  1. Hessner
    Hessner avatar
    189 posts
    Member since:
    Mar 2003

    Posted 04 Feb 2009 Link to this post

    No matter what my input are, the result/sort order are the same.

    It seems that the filter dosent "kick in".

    Here are my code:

    aspx:  
     
    <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" 
     AllowSorting="True" PageSize="3" AllowPaging="True" AutoGenerateColumns="False" AllowFilteringByColumn="True" EnableViewState="True" GridLines="None" ShowGroupPanel="True">  
     <PagerStyle Mode="NextPrevAndNumeric" /> 
       <MasterTableView ShowFooter="True">  
         <Columns> 
            <telerik:GridHyperLinkColumn DataTextFormatString="Ret" DataNavigateUrlFields="UserID" 
                                    DataNavigateUrlFormatString="http://www.google.com/search?hl=en&amp;q={0}&amp;btnG=Google+Search" 
                                    UniqueName="Ret" DataTextField="UserID" HeaderText="Ret" AllowFiltering="false" > 
           </telerik:GridHyperLinkColumn> 
           <telerik:GridHyperLinkColumn DataTextFormatString="Slet" DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="javascript: void(alert('UserId={0}'));" 
           UniqueName="Slet" DataTextField="UserID" HeaderText="Slet"  AllowFiltering="false">  
           </telerik:GridHyperLinkColumn> 
           <telerik:GridBoundColumn UniqueName="Email" SortExpression="Email" HeaderText="E-mail" 
           DataField="Email" CurrentFilterFunction="StartsWith" AutoPostBackOnFilter="true">  
           </telerik:GridBoundColumn> 
           <telerik:GridBoundColumn UniqueName="FuldeNavn" SortExpression="FuldeNavn" HeaderText="Navn" 
           DataField="FuldeNavn">  
           </telerik:GridBoundColumn> 
           <telerik:GridBoundColumn UniqueName="Medlemsnummer" SortExpression="Medlemsnummer" 
           HeaderText="Medlemsnummer" DataField="Medlemsnummer">  
           </telerik:GridBoundColumn> 
           <telerik:GridBoundColumn UniqueName="RoleName" SortExpression="RoleName" HeaderText="Rolle" 
           DataField="RoleName">  
           </telerik:GridBoundColumn> 
           </Columns> 
         </MasterTableView> 
    </telerik:RadGrid> 

     protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
            {  
                IObjectScope os = (IObjectScope)Context.Items["ObjectScopeProvider"];  
                IQueryable result = from x in os.Extent<UserRole>()  
                                    where x.PortalID == 1  
                                    select new { x.User.UserID, x.User.Email, x.User.FuldeNavn, x.Medlemsnummer, x.Role.RoleName };  
     
                RadGrid1.DataSource = result;   
             } 

    The grid are filled every time I enter data to filter from (number of rows/sort order are the same).
  2. Hessner
    Hessner avatar
    189 posts
    Member since:
    Mar 2003

    Posted 04 Feb 2009 Link to this post

    Ok, I found the solution:

     EnableLinqExpressions ="false"

    solved it.

     

     

     

     

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top