private void ButtonClick(object sender, CellClickEventArgs cellClickEventArgs) { if (cellClickEventArgs.Column == olvEditInPopup) { var col = cellClickEventArgs.Model as IColumn; if (col != null) { var dialog = new SetSQLDialog(col.SelectSQL, new RDMPCombineableFactory()); var querySyntaxSource = col as IHasQuerySyntaxHelper ?? _aggregate; var autoComplete = new AutoCompleteProviderWin(querySyntaxSource.GetQuerySyntaxHelper()); autoComplete.Add(col); autoComplete.Add(_aggregate); autoComplete.RegisterForEvents(dialog.QueryEditor); if (dialog.ShowDialog() == DialogResult.OK) { col.SelectSQL = dialog.Result; Save(col); } } } }
private void btnSetSQL_Click(object sender, System.EventArgs e) { SetSQLDialog dialog = new SetSQLDialog((string)_args.InitialValue, new RDMPCombineableFactory()); DialogResult d = dialog.ShowDialog(); if (d == DialogResult.OK) { _args.Setter(_args.InitialValue = dialog.Result); } }