Spread Silverlight Documentation
DataValidationListPopupOpening Event (GcSpreadSheet)
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class : DataValidationListPopupOpening Event
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
(Inherited from System.ComponentModel.CancelEventArgs)
Gets the column index of the cell.  
Gets 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
See Also