Spread WPF Documentation
DataValidationListPopupOpening Event (GcSpreadSheet)
Example 


Occurs when a data validation list popup is opening.
Syntax
'Declaration
 
Public Event DataValidationListPopupOpening As System.EventHandler(Of CellCancelEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As System.EventHandler(Of CellCancelEventArgs)
 
AddHandler instance.DataValidationListPopupOpening, handler
public event System.EventHandler<CellCancelEventArgs> DataValidationListPopupOpening
Event Data

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

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs)
ColumnGets the column index of the cell.  
RowGets the row index of the cell.  
Example
This example uses the DataValidationListPopupOpening event.
GcSpreadSheet1.HighlightInvalidData = true;
var valid = GrapeCity.Windows.SpreadSheet.Data.DataValidator.CreateListValidator("5,10,15,20");
GcSpreadSheet1.Sheets[0].Cells[0, 1].DataValidator = valid;
GcSpreadSheet1.Sheets[0].Cells[0, 0].Text = "5, 10, 15, and 20 are valid numbers.";

private void GcSpreadSheet1_DataValidationListPopupOpening(object sender, GrapeCity.Windows.SpreadSheet.UI.CellCancelEventArgs e)
        {
            TextBox1.Text = e.Column.ToString();
        }
GcSpreadSheet1.HighlightInvalidData = True
Dim valid = GrapeCity.Windows.SpreadSheet.Data.DataValidator.CreateListValidator("5,10,15,20")
GcSpreadSheet1.Sheets(0).Cells(0, 1).DataValidator = valid
GcSpreadSheet1.Sheets(0).Cells(0, 0).Text = "5, 10, 15, and 20 are valid numbers."

Private Sub GcSpreadSheet1_DataValidationListPopupOpening(sender As Object, e As GrapeCity.Windows.SpreadSheet.UI.CellCancelEventArgs) Handles GcSpreadSheet1.DataValidationListPopupOpening
TextBox1.Text = e.Column.ToString()
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.