We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

search and replace operations in Grid Grouping Control.

Thread ID:

Created:

Updated:

Platform:

Replies:

129971 Apr 12,2017 03:38 PM UTC Apr 17,2017 08:48 AM UTC WinForms 7
loading
Tags: GridGroupingControl
Gregory Pe
Asked On April 12, 2017 03:38 PM UTC


Why the example does not work

search-and-replace operations in Grid Grouping Control.
please help



Attachment: test009dgw_3d62af35.rar

Arulpriya Ramalingam [Syncfusion]
Replied On April 13, 2017 09:07 AM UTC

Hi Gregory, 

Thanks for contacting Syncfusion support team. 

We have analyzed your attached sample and we could able to reproduce your scenario. The button clicks events were not triggered for the buttons in the GridFindReplaceDialog dialog. The Button click event should be triggered to perform the actions OnButtonClick. We have hooked the events in GridFindReplaceDialog.Designer.cs file to achieve your requirement. Please make use of below code and modified attached sample, 

Code snippet 
 
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); 


Regards, 
Arulpriya 


Gregory Pe
Replied On April 13, 2017 11:44 AM UTC

Hi Arulpriya
it works


I have a question

You would make GridFindReplaceDialog not go beyond Form1 - IsMdiContainer

Regards,
Gregory

Arulpriya Ramalingam [Syncfusion]
Replied On April 13, 2017 01:06 PM UTC

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

Gregory Pe
Replied On April 13, 2017 01:27 PM UTC

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


Hi Arulpriya
Thank you with quick feedback

That means you can not do anything like that

  GridFindReplaceDialog ChildForm = new GridFindReplaceDialog ();
             ChildForm.MdiParent = this;
             ChildForm.Show ();

To be in the area of Form1 ();

Regards,
Gregory

Piruthiviraj Malaimelraj [Syncfusion]
Replied On April 14, 2017 07:38 AM UTC

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 


Gregory Pe
Replied On April 14, 2017 09:11 AM UTC

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 


  Hi Piruthiviraj

GridFindReplaceDialog f = new GridFindReplaceDialog(this.M_RECEIPT_NON_STOCK_gridGroupingControl, "Metro");
                    f.MdiParent = this.MdiParent;
                    f.ShowDialog(); //f.Show();



Why does not work the method 
f.ShowDialog();
How can i do
ShowDialog() in this.MdiParent;

Regards,
Gregory


Piruthiviraj Malaimelraj [Syncfusion]
Replied On April 17, 2017 08:48 AM UTC

Hi Gregory, 

Thanks for the update. 
 
As per your scenario, you are trying to use GridFindAndReplaceDialog as a child form of Form2. If you try to show the GridFindAndReplaceDialog by using “ShowDialog” , it will throws the exception “Form that is not a top-level form cannot be displayed as a modal dialog box. Remove the form from any parent form before calling showDialog”. The error tells the MDI child form is not a top-level form. Because we still need to interact with parent form. So the MDI child form can’t be shown as a modal dialog box. Please refer to the below forum, 

 
The recommended way to show the MDI child form is using the “Show” method instead of using “ShowDialog”.  
 
Please let us know if you have any other queries. 

Regards, 
Piruthiviraj 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;