MobileForms Toolkit Documentation

AdvancedList.ValidateData Event

Occurs after the row is loaded from DbConnector and before the row is added to RowCollection.

public event ValidateDataEventHandler ValidateData;

Remarks

Validate data event is usefull for custom data processing. It has the arguments of type ValidateDataArgs.

Example

[Visual Basic]

Private Sub AdvancedList1_ValidateData(ByVal sender As Object, ByVal e As Resco.Controls.ValidateDataArgs)_
 Handles AdvancedList1.ValidateData
    ' we will use the validate data handler to set the flags and background 
    ' for the customer preview or details
    
    Select Case e.DataRow("Country")
        Case "UK"
            e.DataRow("Flag") = 18
            e.DataRow("Background") = 0
        Case "USA"
            e.DataRow("Flag") = 19
            e.DataRow("Background") = 1
    End Select
End Sub
            
[C#]

private void AdvancedList1_ValidateData(object sender, Resco.Controls.ValidateDataArgs e)
{
    // we will use the validate data handler to set the flags and background 
    // for the customer preview or details
    
    switch ((string)e.DataRow["Country"])
    {
        case "UK":
            e.DataRow["Flag"] = 18;
            e.DataRow["Background"] = 0;
            break;
        case "USA":
            e.DataRow["Flag"] = 19;
            e.DataRow["Background"] = 1;
            break;
    }
}
            

See Also

AdvancedList Class | Resco.Controls.AdvancedList Namespace | ValidateDataArgs