Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
ValueList with FilterContitions shows wrong cell text
posted

I have an UltraWinGrid with a filter row at the top. Some string colums have a dropdown with filters. 

On BeforeRowFilterDropDown I have the following code:

if (typeof(string) == e.Column.DataType){
  FilterCondition condition = new FilterCondition(e.Column, FilterComparisionOperator.Match, "^[A-Za-z]");

  e.ValueList.ValueListItems.Insert(0, condition, "All");                
}

This works fine. The problem is what happens when I select the 'All' filter, and take the focus away from the filter cell after that. The cell text changes from 'All' to the FilterCondition.CompareValue, in this case ^[A-Za-z]. I've found out that this is the ToString from FilterCondition. But how does the cell display text get overwritten in the first place? And what can I do to avoid it? I've tried to inherit FilterCondition and override the ToString, but no luck. 

I've also found an internal string displayTextOverride; in ColumnFilter that makes me wonder a bit about what's going on.

Regards,
Trond