AD
Administrator
Syncfusion Team
March 11, 2004 02:21 PM UTC
If you are using VB, you can use the Val function to return zero when the value in the cell is the empty string which is what is being displayed when there is no value in the cell.
dim d as double = Val(Me.grid(4, 2).Text)
will return zero when the cell is empty and will return the value when it is not.
If you are using C#, then you will have to conditionally handle this situation.
double d = (this.grid[4,2].Text.Length == 0) ? 0 : double.Parse(this.grid[4,2].Text);