开发者

How to change the radgrid case-sensitivity using webconfig?

Since the Grid filter is case-sensitive, i used the code below

Rad开发者_开发技巧Grid1.GroupingSettings.CaseSensitive = false;

Can we configure the same using webconfig,

so that radfilter is case-insensitive in the entire project?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜