示例#1
0
        public ABCGridBand.BandConfig InitBand(BindingList <ABCGridBandedColumn.ColumnConfig> inputCols, ABCGridBand.BandConfig inputBand)
        {
            ABCGridBand.BandConfig bandResult = (ABCGridBand.BandConfig)inputBand.Clone();
            bandResult.Children.Clear();
            bandResult.Columns.Clear();

            foreach (ABCGridBand.BandConfig childInputBand in inputBand.Children)
            {
                bandResult.Children.Add(InitBand(inputCols, childInputBand));
            }

            foreach (ABCGridBandedColumn.ColumnConfig childInputColumn in inputBand.Columns)
            {
                if (inputCols.Contains(childInputColumn) == false)
                {
                    continue;
                }

                ABCGridBandedColumn.ColumnConfig newCol = (ABCGridBandedColumn.ColumnConfig)childInputColumn.Clone();
                bandResult.Columns.Add(newCol);
                ColumnList.Add(newCol);

                ExploredColumns.Add(childInputColumn);
            }

            return(bandResult);
        }
示例#2
0
        public ABCGridBand.BandConfig GetBandConfig(ABCGridBand band)
        {
            ABCGridBand.BandConfig newBand = (ABCGridBand.BandConfig)band.Config.Clone();
            foreach (ABCGridBand childBand in band.Children)
            {
                newBand.Children.Add(GetBandConfig(childBand));
            }

            foreach (ABCGridBandedColumn col in band.Columns)
            {
                if (this.ColumnList.Contains(col.Config))
                {
                    newBand.Columns.Add(col.Config);
                }
            }

            return(newBand);
        }
示例#3
0
        void BandConfigGridView_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Delete)
            {
                if (this.BandConfigGridView.SelectedRowsCount > 0)
                {
                    if (ABCHelper.ABCMessageBox.Show("Delete Band?", "Confirmation", MessageBoxButtons.YesNo) != DialogResult.Yes)
                    {
                        return;
                    }

                    ABCGridBand.BandConfig config = (ABCGridBand.BandConfig) this.BandConfigGridView.GetRow(this.BandConfigGridView.FocusedRowHandle);
                    config = null;
                    this.BandConfigGridView.DeleteSelectedRows();
                    RefreshDisplayGrid();
                }
            }
        }