Esempio n. 1
0
        private void NewColumn()
        {
            using (var dialog = new InputDialog(
                       "New Column",
                       "Enter a caption for the new column",
                       "<New Column>"))
            {
                if (dialog.ShowDialog(this) != DialogResult.Cancel)
                {
                    ViewListColumn column = new ViewListColumn();

                    column.Caption = dialog.Value;

                    column.Index = _selectedViewState.ListSettings.Columns.Count;

                    _selectedViewState.ListSettings.Columns.Add(column);

                    ReloadColumns();
                }
            }
        }
Esempio n. 2
0
        private void CopyColumn()
        {
            using (var dialog = new InputDialog(
                       "Copy Column",
                       "Enter a name for the new column",
                       $"Copy of {_selectedColumn.Caption}"))
            {
                if (dialog.ShowDialog(this) != DialogResult.Cancel)
                {
                    ViewListColumn column = new ViewListColumn();

                    column.Caption = dialog.Value;

                    column.Index = _selectedViewState.ListSettings.Columns.Count;

                    UpdateColumnDetails(column);

                    _selectedViewState.ListSettings.Columns.Add(column);

                    ReloadColumns();
                }
            }
        }