Reducing the filter menu options slows down the grid

5 posts, 0 answers
  1. NightFlash
    NightFlash avatar
    50 posts
    Member since:
    Mar 2007

    Posted 28 Sep 2010 Link to this post

    Hi,

    I'm using the radGrid with the Linq datasource to load 10 000 rows with paging.
    This really works perfect because in 1 sec the whole page is loaded.

    But because my website is in 2 language and there are too many filter options I want to change those options with the codebehind.
    But when I tried this solution : http://www.telerik.com/help/aspnet-ajax/grdreducingfiltermenuoptions.html the whole datagrid need more than 5 sec to load which is not acceptable, is there any solution to change this?

    protected void RadGrid1_Init(object sender, System.EventArgs e)
    {
     GridFilterMenu menu = RadGrid1.FilterMenu;
     int i = 0;
     while(i < menu.Items.Count)
     {
       if(menu.Items[i].Text == "NoFilter" ||
          menu.Items[i].Text == "Contains" ||
          menu.Items[i].Text == "EqualTo" ||
          menu.Items[i].Text == "GreaterThan" ||
          menu.Items[i].Text == "LessThan")
       {
         i++;
       }
       else
       {
         menu.Items.RemoveAt(i);
       }
     }
    }

    Thnx you!
    Kevin
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Sep 2010 Link to this post

    Hello Kevin,


    Have you tried the client side apporach for reducing the filter menu options, as described in the documentation?
    Reducing the filter menu options



    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NightFlash
    NightFlash avatar
    50 posts
    Member since:
    Mar 2007

    Posted 28 Sep 2010 Link to this post

    Not yet, I'll try that in 20minutes and I'll let you know. Do you maybe know how I can translate the words in dutch and french according the browser language?
  5. NightFlash
    NightFlash avatar
    50 posts
    Member since:
    Mar 2007

    Posted 28 Sep 2010 Link to this post

    Hi Shinu,

    I tried the client side solution and this worked, so thank you very much for that!

    Is there a way I can translate the words according the language of the browser (dutch or french)?

    Best regards,
    Kevin
  6. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Sep 2010 Link to this post

    Hello,


    I hope the following links will help you in localizing the grid.
    Localization through resource files
    Localization through global resources


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