Search code examples
c#.netinfragistics

UltraGrid Filter cell property


Working on a code that was written by someone else. Here are the important parts of the code:

 UltraGridColumn col = columns.Add("FolderImage", "Status");
 col.Header.Fixed = true;
 col.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;

There is more code written to specify the behavior of the folder, but it is irrelevant for the example; As of right now, the following result is generated:

enter image description here

As you can see, there is a greyed out "Filter" button, and the pin is missing:

I want it to look like this:

enter image description here

I.e. filter button needs to go in the status column (it just needs to be blank), and the pin button should be enabled. According to the Infragistics manual, the code above should produce the very results I am looking for, but it does not.


Solution

  • To hide the filter operator (the 'A' letter) you need to set FilterOperatorLocation of the column to Hidden. To show the pin of the fixed column you need to set to its header FixedHeaderIndicator to Button (by the way this is default value, so if you did not override it at some other place you may skip this step). Try to use code like this:

    col.FilterOperatorLocation = FilterOperatorLocation.Hidden;
    col.Header.FixedHeaderIndicator = FixedHeaderIndicator.Button;