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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to enable find and replace in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl
Tags: findreplace

Find and replace

To implement find and replace with keyboard shortcut, you need to use the event TableControlCurrentCellKeyDown. The searching and replacing of text and numbers can be done as like the Find and Replace functionality in the Excel. This can be done by using dialog or programmatically. This can be achieved to the GridGroupingControl by creating a custom class GridFindReplaceDialog.


// Displays the Find and Replace Dialog box.
void gridGroupingControl1_TableControlCurrentCellKeyDown(object sender, GridTableControlKeyEventArgs e)
       if(e.Inner.KeyCode == Keys.F || e.Inner.KeyCode == Keys.H)
          //if CTRL+F||CTRL+H is used, the findandreplacedialog will be displayed.
          GridFindReplaceDialog f = new GridFindReplaceDialog(this.gridGroupingControl1, "Metro");


'Displays the Find and Replace Dialog box.
Private Sub gridGroupingControl1_TableControlCurrentCellKeyDown(ByVal sender As Object, ByVal e As GridTableControlKeyEventArgs)
   If e.Inner.Control Then
      If e.Inner.KeyCode = Keys.F OrElse e.Inner.KeyCode = Keys.H Then
         'if CTRL+F||CTRL+H is used, the findandreplacedialog will be displayed.
         Dim f As New GridFindReplaceDialog(Me.gridGroupingControl1, "Metro")
      End If
   End If
End Sub



Show the find and replace dialog box


C#: FindandReplace_CS

VB: FindandReplace_VB

Reference link: https://help.syncfusion.com/windowsforms/gridgrouping/findandreplace

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile