开发者

XCeed WPF DataGrid: FilterCell for a specific property of converted value

I am using XCeed DataGrid for WPF v4.0. My data grid control has got one column with FieldName=PropA. Using DisplayMemberBindingInfo I convert its value to another class object with two properties in it 1. Content 2. BackGroundColor. Inside CellContentTemplate I use property Content as cell content and property BackGro开发者_如何学PythonundColor as background color of that cell. I am not able to understand how should I create FilterCell for this column so that I would be able to filter rows on cell content. Does Converted Class need to implement any interface for this?

XCeed WPF DataGrid: FilterCell for a specific property of converted value


Solution is pretty simple:-

1) In such cases never apply converter on DisplayMemberBindingInfo of a column.(If you do so then XCeed FilterCell applies filter on converted value.)

2) Inside CellContentTemplate convert cellbinding to Converted Class. (Example:- place grid inside this template and assign converted value to its data context and then consume the data context to decorate your cell)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜