如何将文本框绑定到文章的父类别名称 [英] How can i bind a Textbox to a Parent Category Name of an Article

查看:86
本文介绍了如何将文本框绑定到文章的父类别名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我有文章和类别,我想在DataGridView中显示文章列表,并且我想在列中显示(当然是不可编辑的)类别名称.是否有可能在没有数据库视图的情况下解决此问题?因为视图不可更新.为什么无法将列绑定到Category_ID.Name?

另一种解释是我想在显示详细信息记录的DataGridView中显示主记录的名称.

For example I have articles and categories and I want to show an article list in a DataGridView and I want to display (of Course not editable) the name of the category in a column. Is there a possibility to solve this without a view on the database? Because a view isn''t updateable. Why isn''t it possible to bind the column to Category_ID.Name?

Another explanation I''d like to display the name of my master record in a DataGridView where I display details records.

推荐答案

为什么不在ListBox/中列出类别组合框.然后,如果您的人际关系设置正确,则DGV应该会显示该类别中的文章.
Why not list the Categories in a ListBox/ComboBox. Then if your relationships are set up correctly the DGV should show the articles in that category.


这篇关于如何将文本框绑定到文章的父类别名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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