GrapeCity.Xaml.SpreadSheet.UI
DataValidationListPopupOpening Event (GcSpreadSheet)
Example 


GrapeCity.Xaml.SpreadSheet.UI Namespace > GcSpreadSheet Class : DataValidationListPopupOpening Event
Occurs when a data validation list popup is opening.
Syntax
'Declaration
 
Public Event DataValidationListPopupOpening As EventHandler(Of CellCancelEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of CellCancelEventArgs)
 
AddHandler instance.DataValidationListPopupOpening, handler
public event 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.
private void Grid_Loaded_1(object sender, RoutedEventArgs e)
        {
            GcSpreadSheet1.HighlightInvalidData = true;
            var valid = GrapeCity.Xaml.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.Xaml.SpreadSheet.UI.CellCancelEventArgs e)
        {
            TextBox1.Text = e.Column.ToString();
        }
GcSpreadSheet1.HighlightInvalidData = True
Dim valid = GrapeCity.Xaml.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.Xaml.SpreadSheet.UI.CellCancelEventArgs) Handles GcSpreadSheet1.DataValidationListPopupOpening
TextBox1.Text = e.Column.ToString()
End Sub
See Also