protected override void BaseListForm_Load(object sender, EventArgs e) { base.BaseListForm_Load(sender, e); RefreshHelper = new GridCointrolState(new[] { new GridCointrolState.ViewDescriptor("", "ID"), new GridCointrolState.ViewDescriptor("Costs", "CostID") }); }
protected override void BaseListForm_Load(object sender, EventArgs e) { base.BaseListForm_Load(sender, e); foreach (var item in Factory.Manager<PaymentDataSettingsManager>().GetByOffice(CurrentInfo.OfficeID)) { var column = viewActs.Columns[item.PaymentFieldID.ToString()]; if (!item.Show) { column.VisibleIndex = -1; } else { if (column.VisibleIndex == -1) { column.VisibleIndex = viewActs.Columns.Cast<GridColumn>().Count(c => c.VisibleIndex != -1); } } } menuGrid.Items.Add(menuItemAddNote); menuGrid.Items.Add(menuItemSteps); //menuGrid.Items.Add(itemAddStatus); itemAddStatus.Click += itemAddStatus_Click; RefreshHelper = new GridCointrolState(new[] { new GridCointrolState.ViewDescriptor("", "ID"), new GridCointrolState.ViewDescriptor("Steps", "ID"), new GridCointrolState.ViewDescriptor("Documents", "ID"), new GridCointrolState.ViewDescriptor("StatusHistory", "ID"), new GridCointrolState.ViewDescriptor("Notes", "ID") }); viewActs.OptionsMenu.EnableColumnMenu = CurrentInfo.Permission == ePermissions.Admin; viewActs.OptionsMenu.EnableFooterMenu = CurrentInfo.Permission == ePermissions.Admin; viewActs.OptionsMenu.EnableGroupPanelMenu = CurrentInfo.Permission == ePermissions.Admin; viewActs.OptionsCustomization.AllowColumnMoving = CurrentInfo.Permission == ePermissions.Admin; viewActs.OptionsCustomization.AllowGroup = CurrentInfo.Permission == ePermissions.Admin; }
protected ViewState(GridCointrolState gridState, ViewDescriptor descriptor) { this.gridState = gridState; this.descriptor = descriptor; this.parent = null; }
public static ViewState Create(GridCointrolState gridState, GridView view) { if (!gridState.viewDescriptors.ContainsKey(view.LevelName)) return null; ViewState state = new ViewState(gridState, (ViewDescriptor)gridState.viewDescriptors[view.LevelName]); return state; }
protected ViewState(ViewState parent, ViewDescriptor descriptor) { this.parent = parent; this.gridState = parent.gridState; this.descriptor = descriptor; }