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
.
If property types or number of properties changes, then use Anyonymous Object
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.