I need make a properties dynamically. because I need bind to DataGrid.
I made a simple class, but I have no more ideas.
public class MyDataModel {
public int Id {get; set;}
public string Name {get; set;}
public bool CheckItem1 {get; set;}
public bool CheckItem2 {get; set;}
public bool CheckItem3{get; set;}
....
public bool CheckItenN {get; set;}
}
var checkList = GetCheckItems();
foreach(var item in checkList){
//I want to add item's property to MyDataModel.
}