views:

115

answers:

1

Hi , since Grid filter is case sensitive , i used the code below RadGrid1.GroupingSettings.CaseSensitive = false; Can weconfigure the same thing webconfig so that in the whole project case sensitiveness of radfilter will be false.

A: 

My gut feeling on this is that you can't explicitly set properties of controls from the web.config.

I can come up with a couple ways to do this though:

1.) Make a custom control that inherits from RadGrid. In this control, default the GroupingSettings.CaseSensitive property to false. In this case; anywhere you use this control will have case insensitive filtering; unless its explicitly enabled.

2.) Make a custom control that inherits from radgrid, but instead of defaulting the CaseSensitive property to false; set it to a variable you have in your web.config. Such as:

RadGrid1.GroupingSettings.CaseSensitive = (bool)ConfigurationManager.AppSettings["RadgridFilterCaseSensitivity"];

This will make it specific to each application; however you'll need to include the web.config key in each project you use it in.

Jim B
Thanks Jim given below is the Reply i got from telerik site.it almost matches ur answer. The RadGrid does not support the functionality for adding values of gird's properties in web.config and use them globally. To achieve the desired functionality you could try inheriting the RadGrid and set specific RadGrid's properties to the values. In that way these properties will be set only ones for all objects which inherited the RadGrid.
soumya joseph