How to Differentiate Two Cell Values in DataGridView Control
I read a lot of question about this on the forum and thought it’s time to share with you on how to differentiate two cell values in DataGridView control.
By default we use the Value property of cells like:
QtyOrdered = InvoiceDetails("Qty", e.RowIndex).Value
Another is to use the FormattedValue like:
QtyOrdered = InvoiceDetails("Qty ", e.RowIndex).FormattedValue
But the two code above will not work if you have a condition like
If QtyOrdered > InvoiceDetails ("TotalQty", e.RowIndex).Value Then
to determine if the Qty Ordered is less than the