Spread Windows Forms 7.0 Product Documentation
StringNotFound Event
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SearchDialog Class : StringNotFound Event


Glossary Item Box

Occurs when the search is cancelled with the string not found.

Syntax

Visual Basic (Declaration) 
Public Event StringNotFound As CancelEventHandler
Visual Basic (Usage)Copy Code
Dim instance As SearchDialog
Dim handler As CancelEventHandler
 
AddHandler instance.StringNotFound, handler
C# 
public event CancelEventHandler StringNotFound

Event Data

The event handler receives an argument of type CancelEventArgs containing data related to this event. The following CancelEventArgs properties provide information specific to this event.

PropertyDescription
Cancel  

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 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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