Exemplo n.º 1
0
        private void PopulateHostColumnsCombo( )
        {
            _tblCols.Clear();
            colHostColumns.DataSource = null;
            _tblHostCols.Clear();

            TableWrapper hostTable = cmbHostTables.SelectedItem as TableWrapper;

            if (hostTable == null)
            {
                return;
            }

            DataRow   row = null;
            DataTable tbl = DbCmd.GetColumnsSimple(_cp, hostTable.NormalizedFullName);

            foreach (DataRow colRow in tbl.Rows)
            {
                row            = _tblHostCols.NewRow();
                row["colName"] = colRow["colName"];
                _tblHostCols.Rows.Add(row);
            }

            colHostColumns.DataSource    = _tblHostCols;
            colHostColumns.DisplayMember = "colName";
            colHostColumns.ValueMember   = "colName";
        }