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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Start a CellEdit programmatically

Thread ID:





114666 Dec 3,2013 05:56 PM UTC Dec 5,2013 08:32 AM UTC WPF 1
Tags: GridControl
Branden Boucher
Asked On December 3, 2013 05:56 PM UTC

Is there a way any of you know to start the edit process on a cell programmatically? Basically, I have the user clicking an "Add" button which adds a new row to my DataGrid. I select the first new cell in that row automatically, but the user still has to click, double-click, or press F2 to start editing. Is there a way to start that through code instead? I have tried raising a KeyDown event on the DataGrid (using DataGrid.RaiseEvent) but that doesn't seem to be working.

Also, how do you change the color of the grid lines?

Thanks in advance.

Shakul Hameed M [Syncfusion]
Replied On December 5, 2013 08:32 AM UTC

Hi Branden,


Thanks for contacting Syncfusion.


We have analyzed your query and we can achieve your requirement by using BeginEdit() method like in the below code snippt.

Please refer the following code snippet.


Code Snippet:

private void AddButton_Click(object sender, RoutedEventArgs e)


            this.GridDataControl1.ShowAddNewRow = true;          

            this.GridDataControl1.Model.Grid.CurrentCell.MoveTo(1, 0);




We have prepared a sample based on your requirement. In this, I have added a new now, and moved the current cell position to that new row.

And then start the editable process by using BeginEdit() method.


Please find the sample from the below location:


Sample: BeginEdit.zip


Please let us know if you need further assistance,



Shakul Hameed


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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