)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: WinForms |
Control: GridControl |
Published Date: April 27, 2016 |
Last Revised Date: December 17, 2019

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

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon