Hello,
I am looking for general advice/guidance on using the RadDataFilter when the filtered result is displayed in a Grid that uses Value Converters. Let me paint the scenario...
In the general use case, the RadDataFilter accepts a Source and emits a FilteredItemSource. The Source is the collection of items to be filtered, and the Filtered ItemSource is the result of the filter, that can be bound to some other control like the RadGridView. However, if a column in the GridView used to display the results uses a Value Converter to modify the displayed value in any way, you can get into a problem that will cause a lot of confusion to the user. Namely, the filter no longer operates on values as displayed in the grid. So when the user enters filter criteria, the grid may not filter as expected because the user is most likely entering values that match the display in the grid, while the filter is operating on the underlying values.
I believe that this problem can also be demonstrated when perhaps the backing data contains a value of type double, while the datagrid uses a string format to show the value as a percent.
Although I believe I know why things are working this way, I am wondering what the best-practices might be to get things to work as expected from the user. Should we refrain from using Value Converters in the display, and instead do the conversion in the backing store (i.e. the RadDataFilter's Source collection) hence operating on raw values only? If so, this seems a little unfortunate. Is there another approach that might be helpful here?
I am curious to hear whether anyone else has run into this problem and what you might have done.
Thanks,
Mark.
I am looking for general advice/guidance on using the RadDataFilter when the filtered result is displayed in a Grid that uses Value Converters. Let me paint the scenario...
In the general use case, the RadDataFilter accepts a Source and emits a FilteredItemSource. The Source is the collection of items to be filtered, and the Filtered ItemSource is the result of the filter, that can be bound to some other control like the RadGridView. However, if a column in the GridView used to display the results uses a Value Converter to modify the displayed value in any way, you can get into a problem that will cause a lot of confusion to the user. Namely, the filter no longer operates on values as displayed in the grid. So when the user enters filter criteria, the grid may not filter as expected because the user is most likely entering values that match the display in the grid, while the filter is operating on the underlying values.
I believe that this problem can also be demonstrated when perhaps the backing data contains a value of type double, while the datagrid uses a string format to show the value as a percent.
Although I believe I know why things are working this way, I am wondering what the best-practices might be to get things to work as expected from the user. Should we refrain from using Value Converters in the display, and instead do the conversion in the backing store (i.e. the RadDataFilter's Source collection) hence operating on raw values only? If so, this seems a little unfortunate. Is there another approach that might be helpful here?
I am curious to hear whether anyone else has run into this problem and what you might have done.
Thanks,
Mark.