如何根据搜索组合框更改索引来更改wpf datagrid DataGridTextColumn背景颜色 [英] How to change wpf datagrid DataGridTextColumn background color based on if search combo box changed index

查看:408
本文介绍了如何根据搜索组合框更改索引来更改wpf datagrid DataGridTextColumn背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据搜索组合框更改索引更改wpf datagrid DataGridTextColumn背景颜色



我的数据网格没有背景颜色且其列绑定到linq实体查询并从中获取其绑定路径,

i有另一个外部cobmo框用于搜索并通过其选定的索引,datagrid显示搜索结果集

我想:如果组合box1选择已更改,其绑定列更改其背景

How to change wpf datagrid DataGridTextColumn background color based on if search combo box changed index

my datagrid doesn't have background color and its column bind to linq to entity query and get its binding path from it ,
i have another outer cobmo box for search and by its selected index , datagrid display search result set
I want : if combo box1 is selection changed , its binding column changes its background

推荐答案

使用转换器将搜索字段与textcolumn背景颜色映射,并将此文本列与搜索框的seleteditem绑定
use converter to map search field with textcolumn backgroung color and bind this textcolumn with seleteditem of search box


这篇关于如何根据搜索组合框更改索引来更改wpf datagrid DataGridTextColumn背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆