Esempio n. 1
0
        public void CreateTable(ConnectionParams cp)
        {
            try
            {
                _initializing         = true;
                this.ConnectionParams = cp;
                TableObj = new TableWrapper();

                //This is a fake column. We need to hack some unknown behaviour of the grid
                ColumnWrapper col = new ColumnWrapper();
                col.Name       = "Column";
                col.DataType   = "nchar";
                col.Width      = "10";
                col.AllowNulls = true;
                col.CollectInitialValues();

                TableObj.Columns.Add(col);

                cmbOwner.SelectedIndex = cmbOwner.FindStringExact("dbo");

                BindTableColumns();
                Mode = EditMode.New;

                RenderAdditionalColumnProperties(bsCols.Current as ColumnWrapper);
                ValidateColumns(ColumnValidationType.All);
            }
            finally
            {
                _initializing = false;
            }
        }
Esempio n. 2
0
        private void bsCols_AddingNew(object sender, AddingNewEventArgs e)
        {
            ColumnWrapper col = new ColumnWrapper();

            col.DataType   = "nchar";
            col.Width      = "10";
            col.AllowNulls = true;
            col.CollectInitialValues();
            e.NewObject = col;
        }