void repoFieldNameChooser_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { String strTableName = this.TableName; if (this.ConfigGridView.FocusedRowHandle < 0) { this.ConfigGridView.AddNewRow(); } ABCGridColumn.ColumnConfig config = this.ConfigGridView.GetRow(this.ConfigGridView.FocusedRowHandle) as ABCGridColumn.ColumnConfig; if (config != null) { strTableName = config.TableName; } if (String.IsNullOrWhiteSpace(strTableName) == false) { String strOldFieldName = this.ConfigGridView.GetFocusedDisplayText(); FieldChooserEx chooser = new FieldChooserEx(strTableName, strOldFieldName); if (chooser.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.ConfigGridView.SetFocusedRowCellValue(this.ConfigGridView.FocusedColumn, chooser.Result); } } }
void repoFieldNameChooser_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { ABCPivotGridField.FieldConfig config = this.ConfigGridView.GetRow(this.ConfigGridView.FocusedRowHandle) as ABCPivotGridField.FieldConfig; if (config != null) { String strOldFieldName = this.ConfigGridView.GetFocusedDisplayText(); FieldChooserEx chooser = new FieldChooserEx(config.TableName, strOldFieldName); if (chooser.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.ConfigGridView.SetFocusedRowCellValue(this.ConfigGridView.FocusedColumn, chooser.Result); } } }
void repoFieldNameChooser_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { String strTableName = this.TableName; TreeConfigNode obj = (TreeConfigNode)DataConfigTreeCtrl.GetDataRecordByNode(DataConfigTreeCtrl.FocusedNode); if (obj == null || (TreeConfigData)obj.InnerData == null) { return; } TreeConfigData configData = (TreeConfigData)obj.InnerData; strTableName = configData.TableName; if (String.IsNullOrWhiteSpace(strTableName) == false) { String strOldFieldName = String.Empty; if (configData.ColumnFieldNames.ContainsKey(this.DataConfigTreeCtrl.FocusedColumn.Caption)) { strOldFieldName = configData.ColumnFieldNames[this.DataConfigTreeCtrl.FocusedColumn.Caption]; } FieldChooserEx chooser = new FieldChooserEx(strTableName, strOldFieldName); if (chooser.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (configData.ColumnFieldNames.ContainsKey(this.DataConfigTreeCtrl.FocusedColumn.Caption)) { configData.ColumnFieldNames[this.DataConfigTreeCtrl.FocusedColumn.Caption] = chooser.Result; } else { configData.ColumnFieldNames.Add(this.DataConfigTreeCtrl.FocusedColumn.Caption, chooser.Result); } } DataConfigTreeCtrl.RefreshNode(DataConfigTreeCtrl.FocusedNode); DataConfigTreeCtrl.RefreshDataSource(); UpdateDataConfigs(); DisplayTreeListCtrl.RefreshDataSource(); } }