Example #1
0
        protected override List <ToolButton> GetButtons()
        {
            var self    = this;
            var buttons = new List <ToolButton>();

            buttons.Add(new ToolButton
            {
                Title    = GetAddButtonCaption(),
                CssClass = "add-button",
                Hotkey   = "alt+n",
                OnClick  = delegate {
                    self.AddButtonClick();
                }
            });

            buttons.Add(NewRefreshButton(noText: true));
            buttons.Add(ColumnPickerDialog.CreateToolButton(this));

            return(buttons);
        }
Example #2
0
        protected override void ShowPersonalization(object sender, CommandEventArgs e)
        {
            string defaultPersonalization = null;

            if (Configuration != null && Configuration.Presentation != null)
            {
                defaultPersonalization = Configuration.Presentation;
            }

            using (ColumnPickerDialog columnPickerDialog = new ColumnPickerDialog(defaultPersonalization))
            {
                columnPickerDialog.Grid      = Grid;
                columnPickerDialog.Groupable = false;
                if (columnPickerDialog.ShowDialog(ParentWindow) != DialogResult.OK)
                {
                    return;
                }
                ColumnCollection = new ColumnInfoCollection(columnPickerDialog.GetColumns());
                UpdateFields(true);
                SavePersonalization(this);
            }
        }