this.ReplaceAllBtn.Click += new System.EventHandler(this.ReplaceAllBtn_Click);
this.ReplaceBtn.Click += new System.EventHandler(this.ReplaceBtn_Click);
this.cancelbtn.Click += new System.EventHandler(this.cancelbtn_Click);
this.findallBtn.Click += this.findallBtn_Click;
this.findnextBtn.Click += new System.EventHandler(this.findnextBtn_Click); |
// Displays the Find and Replace Dialog box.
void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
{
if (e.Inner.Control)
{
if (e.Inner.KeyCode == Keys.F || e.Inner.KeyCode == Keys.H)
{
GridFindReplaceDialog f = new GridFindReplaceDialog(this.gridGroupingControl1, "Metro");
f.StartPosition = FormStartPosition.CenterParent;
f.ShowDialog();
}
}
} |
Hi Gregory,
Thanks for your update.
The display position of the GridFindReplaceDialog can be set to center of the Parent Form by setting the FormStartPosition as CenterParent. Please make use of below code and sample,
Code snippet
// Displays the Find and Replace Dialog box.void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e){if (e.Inner.Control){if (e.Inner.KeyCode == Keys.F || e.Inner.KeyCode == Keys.H){GridFindReplaceDialog f = new GridFindReplaceDialog(this.gridGroupingControl1, "Metro");f.StartPosition = FormStartPosition.CenterParent;f.ShowDialog();}}}
Regards,Arulpriya
GridFindReplaceDialog f = new GridFindReplaceDialog(this.gridGroupingControl1, "Metro");
f.MdiParent = this.MdiParent;
f.Show(); |
Hi Gregory,
Thanks for the update.
In our previous update , we have provided the solution to show GridFindReplaceDialog in center of the form. You can show the GridFindReplaceDialog by setting parent form for GridFindReplaceDialog. Please refer to the modified sample and let us know if you have any other queries,Code example:
GridFindReplaceDialog f = new GridFindReplaceDialog(this.gridGroupingControl1, "Metro");f.MdiParent = this.MdiParent;f.Show();
Sample link:
Regards,Piruthiviraj