/// <summary> /// Add a column as a command to the factory /// </summary> /// <param name="expression"></param> /// <returns></returns> public DataTableCommandBuilder SetColumnAsCommand(Func <string> render) { DataTableCommandBuilder cmd = new DataTableCommandBuilder(); cmd.Command(render); this.Columns.Add(cmd); return(cmd); }
public DataTableCommandBuilder SetColumnAsCheckBox(string id) { // I will allow multi checkboxes //if (IndexesDic.ContainsKey("CheckBoxColumn")) //{ // throw new Exception($"CheckBoxColumn is already Set."); //} //IndexesDic["CheckBoxColumn"] = _currentColumnIndex++; _currentColumnIndex++; DataTableCommandBuilder cmd = new DataTableCommandBuilder(); cmd.SetCheckBoxColumn(id); this.Columns.Add(cmd); return(cmd); }