Syncfusion.Grid.Windows
Members  Example 


Syncfusion.Windows.Forms.Grid Namespace : GridFindReplaceDialogSink Class

GridFindReplaceDialogSink Class

Provides a default implementation of a IGridFindReplaceDialogSink for a grid control.
Object Model
GridFindReplaceDialogSink ClassGridControlBase Class
Syntax
'Declaration
 
Public Class GridFindReplaceDialogSink 
   Inherits GridSubComponent
   Implements IGridFindReplaceDialogSink 
'Usage
 
Dim instance As GridFindReplaceDialogSink
public class GridFindReplaceDialogSink : GridSubComponent, IGridFindReplaceDialogSink  
Example
The following example demonstrates how to enable a grid control for find and replace support:
GridFindReplaceDialogSink findReplaceDialogSink;
            
public GridFindReplaceDialogSink GridFindReplaceDialogSink
{
    get
    {
        if (findReplaceDialogSink == null)
        {
            findReplaceDialogSink = new GridFindReplaceDialogSink(this);
        }
        return findReplaceDialogSink;
    }
}
            
protected override void OnCurrentCellActivated(EventArgs e)
{
    GridFindReplaceDialog.ResetFindLocation();
    base.OnCurrentCellActivated(e);
}
            
protected override void OnControlGotFocus()
{
    GridFindReplaceDialog.SetActiveSinkIfVisible(GridFindReplaceDialogSink);
    base.OnControlGotFocus();
}
            
// to show the dialog:
GridFindReplaceDialog frDialog = GridFindReplaceDialog.Instance;
frDialog.SetState(grid.GridFindReplaceDialogSink, "", false);
frDialog.Show();
Dim findReplaceDialogSink As GridFindReplaceDialogSink
            
            
Public ReadOnly Property GridFindReplaceDialogSink() As GridFindReplaceDialogSink
    Get
        If findReplaceDialogSink Is Nothing Then
            findReplaceDialogSink = New GridFindReplaceDialogSink(Me)
        End If
        Return findReplaceDialogSink
    End Get
End Property
            
            
Protected Overrides Sub OnCurrentCellActivated(e As EventArgs)
    GridFindReplaceDialog.ResetFindLocation()
    MyBase.OnCurrentCellActivated(e)
End Sub 'OnCurrentCellActivated
            
            
Protected Overrides Sub OnControlGotFocus()
    GridFindReplaceDialog.SetActiveSinkIfVisible(GridFindReplaceDialogSink)
    MyBase.OnControlGotFocus()
End Sub 'OnEnter
            
' to show the dialog:
Dim frDialog As GridFindReplaceDialog = GridFindReplaceDialog.Instance
frDialog.SetState(grid.GridFindReplaceDialogSink, "", False)
frDialog.Show()
Inheritance Hierarchy

System.Object
   Syncfusion.ComponentModel.NonFinalizeDisposable
      Syncfusion.Windows.Forms.Grid.GridSubComponent
         Syncfusion.Windows.Forms.Grid.GridFindReplaceDialogSink

AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.26

See Also