PDA

View Full Version : [CLOSED] Filter Header Case Insensitve



rguardado
Jan 15, 2015, 1:32 AM
Hi, I have a gridpanel with the next plugin:


<Plugins>
<ext:FilterHeader runat="server" Remote="true" />
</Plugins>

Waht can I do for having the filter working with case insensitive(this for string columns)?

By default the filters with this plugin work with the case sensitive option.

Thanks in advance.

Dimitris
Jan 15, 2015, 7:47 AM
Hello,

In the FilterHeader example, the string comparison between the filter value and the column values takes place inside the Store_ReadData method.

So, one option is to convert the matchValue and itemValue to upper or lower case (Microsoft favors Upper) prior to comparison:



if (type == FilterType.String)
{
matchValue = ((string)value).ToUpper();
itemValue = (oValue as string).ToUpper();
}

rguardado
Jan 16, 2015, 8:18 AM
Thanks, it worked.