需要在Silverlight DataGrid自定义列标题中绑定组合框 [英] Need to Bind a ComboBox in a Silverlight DataGrid Custom Column Header

查看:65
本文介绍了需要在Silverlight DataGrid自定义列标题中绑定组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.我有一个Silverlight数据网格,我们正在尝试使用列标题中的控件进行过滤.我已经使用样式和DataTemplate在列标题中获得了控件,但是我无法弄清楚如何将组合框控件绑定到页面的viewmodel中的ObservableCollection.相同数据网格的RowDetails模板具有一个可以很好地绑定到相同源的控件,但是由于某种原因,标头中的组合似乎无法看到"它.任何帮助将不胜感激.

Hi All. I have a Silverlight datagrid which we''re trying to filter using controls in the column headers. I''ve got the controls in the column headers using styling and the DataTemplate, but I can''t figure out how to bind a combobox control to an ObservableCollection in the page''s viewmodel. The RowDetails template for the very same datagrid has a control that binds to the same source just fine, but for some reason the combo in the header can''t seem to "see" it. Any help would be greatly appreciated.

推荐答案

下面的链接对于从
开头可能会有所帮助.
DataGrid中的ComboBox-Manish Dalal的博客
http://weblogs.asp.net/manishdalal/archive/2008/09/28/combobox-in-datagrid.aspx
The link below might be helpful to start with

ComboBox in DataGrid - Manish Dalal''s blog
http://weblogs.asp.net/manishdalal/archive/2008/09/28/combobox-in-datagrid.aspx


这篇关于需要在Silverlight DataGrid自定义列标题中绑定组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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