Spread Windows Forms 6.0 Product Documentation
OnStringNotFound Method
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SearchDialog Class : OnStringNotFound Method


e
Event arguments

Glossary Item Box

Occurs when the search does not find the string.

Syntax

Visual Basic (Declaration) 
Public Overridable Function OnStringNotFound( _
   ByVal e As CancelEventArgs _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SearchDialog
Dim e As CancelEventArgs
Dim value As Boolean
 
value = instance.OnStringNotFound(e)
C# 
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.
C#Copy Code
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."); 
}

Visual BasicCopy Code
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.