public TableModel(SplitButtonModel splitButton, IEnumerable <object> items, string idPropertyName = "ID") { this.SplitButton = splitButton; this.Items = items; this.IDPropertyName = idPropertyName; Initialize(); }
public SplitButtonModel CreateSplitButtonForItem(IDictionary <PropertyInfo, object> item) { SplitButtonModel splitButton = new SplitButtonModel(); splitButton.DefaultButton = CopySplitButtonItem(this.SplitButton.DefaultButton, item); splitButton.DropDownButton = CopySplitButtonItem(this.SplitButton.DropDownButton, item); foreach (SplitButtonItem original in this.SplitButton.Items) { splitButton.Items.Add(CopySplitButtonItem(original, item)); } return(splitButton); }