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

Reducing the filter menu options slows down the grid

4 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
NightFlash
Top achievements
Rank 1
NightFlash asked on 28 Sep 2010, 11:20 AM
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

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 28 Sep 2010, 12:16 PM
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.
0
NightFlash
Top achievements
Rank 1
answered on 28 Sep 2010, 12:19 PM
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?
0
NightFlash
Top achievements
Rank 1
answered on 28 Sep 2010, 03:26 PM
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
0
Shinu
Top achievements
Rank 2
answered on 29 Sep 2010, 06:56 AM
Hello,


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


-Shinu.
Tags
Grid
Asked by
NightFlash
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
NightFlash
Top achievements
Rank 1
Share this question
or