wpf,将动态对象集合绑定到datagird [英] wpf , binding dynamic object collection to a datagird
本文介绍了wpf,将动态对象集合绑定到datagird的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨专家
动态对象的集合,我想将其绑定到datagird,但是它不起作用.
hi experts
a collection of a dynamic object, i want to bind it to a datagird but it dosen''t work.
List<dynamic> items = new List<dynamic>();
和绑定代码:
and binding code:
this.DataGird.ItemsSource = items;
this.DataGird.Items.Refresh();
(datagird什么也没显示)
我想让datagird自动生成列
(datagird shows nothing)
I want the datagird be auto generate column
what should I do for this problem?
推荐答案
到目前为止,我知道dynamic无法使用完整类型知识在运行时定义可绑定属性.请查看是否可以帮助您:)[ ^ ]
So far I know dynamic are not capable to define the bindable properties at runtime with full type knowledge. Please have a look on that if it can help you :)[^]
这篇关于wpf,将动态对象集合绑定到datagird的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文