将datagridcomboboxcolumn项源绑定到实体数据模型 [英] binding datagridcomboboxcolumn itemsource to entity data model

查看:97
本文介绍了将datagridcomboboxcolumn项源绑定到实体数据模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我完全被困在这里.该任务似乎非常简单,我在不费吹灰之力的情况下阅读了无数页纸,所有示例似乎都适用于与我不同的情况...我如何到达数据源(连接到ms sql的实体数据模型 数据库)从xaml?我想将datagridcomboboxcolumn的itemsource设置为该数据库中表的一列... SelectedValueBinding易于设置(如果我是对的),因为窗口的datacontext已设置为适当的表- 该表用作整个数据网格的源.但是,要显示在下拉列表中的项目存在于数据库的另一个表中...

I'm completely stuck here. The task seems very simple and I have read endels of pages without getting to a conclution, all examples seems to apply to a different situation than mine... How do I reach a data source (entity data model connected to a ms sql database) from xaml? I want to set the itemsource of a datagridcomboboxcolumn to a column in a table in that database... the SelectedValueBinding was easy to set (if I'm right) since the datacontext of the window was already set to the appropriate table - the table that serves as a source for the whole datagrid. However, the items to be displayed in the drop down exists in another table in the database...

推荐答案

将datagridcomboboxcolum.ItemsSource绑定到另一个表
bind datagridcomboboxcolum.ItemsSource to another table


这篇关于将datagridcomboboxcolumn项源绑定到实体数据模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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