/// <summary> /// Attaches index columns table to datasource /// </summary> private void AttachIndexColumns() { DataView view = indexColumns.DataSource is DataView ? indexColumns.DataSource as DataView : new DataView(IndexColumns); if (view.Table != IndexColumns) { view.Table = IndexColumns; } view.RowFilter = DataInterpreter.BuildFilter(IndexColumn.Index, SelectedIndexName); view.Sort = IndexColumn.Ordinal; indexColumns.DataSource = view; }
/// <summary> /// Attaches foreign jey columns table to datasource /// </summary> private void AttachForeignKeyColumns() { DataView view = foreigKeyColumns.DataSource is DataView ? foreigKeyColumns.DataSource as DataView : new DataView(ForeignKeysColumns); if (view.Table != ForeignKeysColumns) { view.Table = ForeignKeysColumns; } view.RowFilter = DataInterpreter.BuildFilter(ForeignKeyColumn.ForeignKeyName, SelectedKeyName); foreigKeyColumns.DataSource = view; }