Hi,
I am using custom filtering and setting the filter expression programmatically. I am using a custom skin and in there I have the following to for rgFilterActive with the assumption that this will be applied to filters that are active.
I am using custom filtering and setting the filter expression programmatically. I am using a custom skin and in there I have the following to for rgFilterActive with the assumption that this will be applied to filters that are active.
| .RadGrid_Resonance .rgFilterActive, |
| .RadGrid_Resonance .rgFilterActive:hover |
| { |
| background-color: #ffffB0; |
| } |
Firstly, with this it doesn't apply the style for the filters that are active, so to workaround in the item created event, I did the following:
| foreach (GridColumn column in grid.Columns) |
| { |
| if (((GridTemplateColumn)column).AllowFiltering == true) |
| { |
| if (column.CurrentFilterFunction != GridKnownFunction.NoFilter) |
| { |
| (filteringItem[column.UniqueName].Controls[1] as Button).CssClass = "rgFilter rgFilterActive"; |
| } |
| else |
| { |
| if (filteringItem[column.UniqueName].Controls.Count > 1) |
| { |
| (filteringItem[column.UniqueName].Controls[1] as Button).CssClass = "rgFilter"; |
| } |
| } |
| } |
| } |
With this everything works as expected, but when we click on the filter image and click outside, it loses the active styling.
Kindly note although this is a small issue, but needs to be resolved. Please let me know should I follow any other way to implement this, or is this an issue grid styling itself.
Thanks,
Tilak

