Articles in this section
Category / Section

How to get the cell value of DoubleTextBox from CurrentCellValidated event in WinForms GridControl?

CurrentCellValidated event

To get cell value for double textbox in CurrentCellValidated event by using below code snippet.

Cell type can be declared as DoubleTextBox.ToString() and also get a cell values for double textbox by using CurrentCellValidated event.

C#:

this.gridControl1.CurrentCellValidated += gridControl1_CurrentCellValidated;
}
private void gridControl1_CurrentCellValidated(object sender, EventArgs e)
{
    //throw new NotImplementedException();
    GridCurrentCell cc = this.gridControl1.CurrentCell;
    if (cc.ColIndex > 0 && cc.RowIndex > 0)
    {
        string value = this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue.ToString();
    }
}

 

VB:

Private Me.gridControl1.CurrentCellValidated += AddressOf gridControl1_CurrentCellValidated
}
Private Sub gridControl1_CurrentCellValidated(ByVal sender As Object, ByVal e As EventArgs)
 'throw new NotImplementedException();
 Dim cc As GridCurrentCell = Me.gridControl1.CurrentCell
 If cc.ColIndex > 0 AndAlso cc.RowIndex > 0 Then
  Dim value As String = Me.gridControl1(cc.RowIndex, cc.ColIndex).CellValue.ToString()
 End If
End Sub
 

Get the cell value for double textbox in GridControl

Samples:

C#: Double Textbox

VB: Double Textbox

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied