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. Image for the cookie policy date
close icon

How to get text from current cell in CurrentCellKeyPress Event method

Hi,

I have used syncfusion grid control for our project.For grid control, I have handled a key press event for the current cell.

In the CurrentCellKeyPress event, I want to get the value I have enetered in the current cell.

I have tried,
gridControl.CurrentCell.Renderer.ControlValue
gridControl[1,gridControl.CurrentCell.ColIndex].Text
but it returned empty string even if I have entered some value.

Please tell me any alterative solution for the above issue.

Thanks,
Deepa

1 Reply

JJ Jisha Joy Syncfusion Team July 7, 2009 04:54 AM UTC

Hi Deepa,

You could get the key value entered in the cell by using e.KeyChar property. See the code:

void gridControl1_CurrentCellKeyPress(object sender, KeyPressEventArgs e)
{
Console.WriteLine(e.KeyChar.ToString());
}

Let me know if this does not serve your needs.

Regards,
Jisha

Loader.
Live Chat Icon For mobile
Up arrow icon