ComponentOne FlexGrid for WinForms
ValidateEditEventArgs Class
Members  Example 

C1.Win.C1FlexGrid Namespace : ValidateEditEventArgs Class
Provides data for the C1FlexGridBase.ValidateEdit event.
Syntax
'Declaration
 
Public Class ValidateEditEventArgs 
   Inherits System.EventArgs
public class ValidateEditEventArgs : System.EventArgs 
Remarks
Example
private void Form1_Load(object sender, EventArgs e)
 {
            _flex = new C1FlexGrid();
            _flex.Dock = DockStyle.Fill;
            this.Controls.Add(_flex);
            OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;Data Source=" + Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\\ComponentOne Samples\\Common\\C1NWind.mdb");
            DataTable ordersTable = new DataTable();
            new OleDbDataAdapter("Select * from [Order]", con).Fill(ordersTable);
            _flex.DataSource = ordersTable;

            _flex.ValidateEdit += _flex_ValidateEdit;
}

private void _flex_ValidateEdit(object sender, ValidateEditEventArgs e)
{
            if(_flex.Cols[e.Col].Name=="Quantity")
            {
                int cellValue;
                if (int.TryParse(_flex.Editor.Text, out cellValue))
                {
                    if (cellValue <=0 || cellValue>100 )
                    {
                        MessageBox.Show("The quantity value must be between 1 and 100 ");
                        e.Cancel = true;
                    }
                }
            }
}
Inheritance Hierarchy

System.Object
   System.EventArgs
      C1.Win.C1FlexGrid.ValidateEditEventArgs

See Also

Reference

ValidateEditEventArgs Members
C1.Win.C1FlexGrid Namespace