[英]How to add multiple row's dynamically in DataGridTextColumn in wpf datagrid
DataGridTextColumn col = new DataGridTextColumn();
col.Header = "SMS_Message";
Binding bind = new Binding();
bind.Source = (I_Want_To_Bind_New_MSG_All_the_Time);
col.Binding = bind;
GridView.Columns.Add(col);
Create proper class
, object of which can be used as DataContext / ItemsSource
. 创建适当的class
, class
对象可用作DataContext / ItemsSource
。
If property types or number of properties changes, then use Anyonymous Object
. 如果属性类型或属性数量发生变化,请使用Anyonymous Object
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.