Spread Windows Forms 9.0 Product Documentation
OnStringNotFound Method
Example 


Event arguments
Occurs when the search does not find the string.
Syntax
'Declaration
 
Public Overridable Function OnStringNotFound( _
   ByVal e As CancelEventArgs _
) As Boolean
'Usage
 
Dim instance As SearchDialog
Dim e As CancelEventArgs
Dim value As Boolean
 
value = instance.OnStringNotFound(e)
public virtual bool OnStringNotFound( 
   CancelEventArgs e
)

Parameters

e
Event arguments

Return Value

Boolean: true if the StringNotFound event (which is raised inside this method) was cancelled; false otherwise
Example
This example illustrates the use of the event by alerting the user the string was not found.
FarPoint.Win.Spread.SearchDialog sd;
fpSpread1.SearchWithDialog("Test");
sd = fpSpread1.SearchDialog;
sd.StringNotFound += new CancelEventHandler(sdStringNotFound);

void sdStringNotFound(object sender, CancelEventArgs e)
{
         MessageBox.Show("The string was not found."); 
}

Dim WithEvents sd As FarPoint.Win.Spread.SearchDialog
FpSpread1.SearchWithDialog("Test")
sd = FpSpread1.SearchDialog
sd.SetCustomTextToDefaults()

Private Sub sdStringNotFound(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles sd.StringNotFound
         MessageBox.Show("The string was not found.")
   End Sub
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SearchDialog Class
SearchDialog Members

 

 


Copyright © GrapeCity, inc. All rights reserved.