DataGrid validation
-
How do I validate the entries in a DataGrid to ensure that the user is filling the grid in correctly? For example, if the user enters a price for 1 to 10 units as being £1.00 on the first row, but they accidentally enter a second price on the second row for 9 to 20 units as £0.90 - how do I catch it (i.e. it should be 11 - 20 units)?
-
How do I validate the entries in a DataGrid to ensure that the user is filling the grid in correctly? For example, if the user enters a price for 1 to 10 units as being £1.00 on the first row, but they accidentally enter a second price on the second row for 9 to 20 units as £0.90 - how do I catch it (i.e. it should be 11 - 20 units)?
you can declare the datatable that the datagrid is sourceing as an instance variable with events
Friend Withevents tab as Datatable
Then you can handle a variety of events related to editing that table such as NewRow and RowChanged