public override void ConfigureColumns(ColumnConfiguration columnConfig) { columnConfig.AddStringColumn("Date", "Date"); columnConfig.AddStringColumn("Task", "Task"); columnConfig.AddStringColumn("Error", "Error", 3); columnConfig.AddHiddenColumn("Id"); columnConfig.AddHiddenColumn("Id"); var json = new JsonHelper(); json.Add("type", "errors"); columnConfig.AddLinkColumn("", "Id", "Detail", EventNumber.ViewBackgroundDetail, parametersToPass: json.ToString()); }
public override void ConfigureColumns(ColumnConfiguration columnConfig) { columnConfig.AddStringColumn("Name", "Name"); columnConfig.AddHiddenColumn("Name"); columnConfig.AddStringColumn("Event", "Event"); columnConfig.AddButtonColumn("Sub Menus", "Id", "...", EventNumber.ViewMenus, new ShowHideColumnSetting() { Display = ColumnDisplayType.Show, Conditions = new List <Condition>() { new Condition("Event", Comparison.IsNull) } }, MenuId); columnConfig.AddHiddenColumn("Position"); columnConfig.AddButtonColumn("", "Id", "Up", EventNumber.IncrementMenuOrder, new ShowHideColumnSetting() { Display = ColumnDisplayType.Show, Conditions = new List <Condition>() { new Condition("Position", Comparison.GreaterThan, "0") } }); columnConfig.AddButtonColumn("", "Id", "Down", EventNumber.DecrementMenuOrder); //TODO: Would be good to hide the Down button for the last item. columnConfig.AddLinkColumn("", "Id", "Edit", EventNumber.EditMenu, null); columnConfig.AddButtonColumn("", "Id", "X", new UserConfirmation("Delete Menu Item?") { OnConfirmationUIAction = EventNumber.DeleteMenu }, columnSetting: new ShowHideColumnSetting() { Display = ColumnDisplayType.Show, Conditions = new List <Condition>() { new Condition("CanDelete", Comparison.Equals, "true") } } ); }