[英]Show nested value entity in textbox on databinding (c# - winforms)
I have an entity with others entities inside. 我有一个实体,里面还有其他实体。 Per example, Entity A has entities B and C. 例如,实体A具有实体B和C。
So, I want to show in a text box the value of ABSomeProperty when I set a datasource for bindindsource. 因此,当我为bindindsource设置数据源时,我想在文本框中显示ABSomeProperty的值。 Is it possible with a workaround? 解决办法是否可能? tks ks
textBox.DataBindings.Add("Text", bindingSource, "B.SomeProperty");
您必须确保B属性不为null。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.