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

SfData Grid Edit

Thread ID:

Created:

Updated:

Platform:

Replies:

118501 Mar 13,2015 10:47 AM UTC Mar 17,2015 06:05 AM UTC WPF 2
loading
Tags: SfDataGrid
MAHESH NARAYANAN V V
Asked On March 13, 2015 10:47 AM UTC

Hi,
   Can you please suggest how to force edit the first row when I add a new Row to Grid? 

MAHESH NARAYANAN V V
Replied On March 13, 2015 10:49 AM UTC

** please see the corrected query

 Can you please suggest how to force edit the first Cell/Column when I add a new Row to Grid? 

Jayapradha S [Syncfusion]
Replied On March 17, 2015 06:05 AM UTC

Hi Mahesh,

Thank you for using Syncfusion products.

We have analyzed your requirement and you can edit the first cell when you have added a new row in grid by using BeginEdit() method in SelectionChanged event as shown in the below code snippet,

Code Snippet:

this.sfdatagrid.SelectionChanged += sfdatagrid_SelectionChanged;

void sfdatagrid_SelectionChanged(object sender, GridSelectionChangedEventArgs e)

{

if (this.sfdatagrid.IsAddNewIndex(rowcolumnIndex.RowIndex))

{

this.Dispatcher.BeginInvoke(new Action(()=>

{this.sfdatagrid.SelectionController.CurrentCellManager.BeginEdit();}),DispatcherPriority.ApplicationIdle);

}

}

We have created a sample to achieve your requirement and please find the sample from the below location,

Sample Link: SfDataGridFiltering.zip

Kindly let us know if this solution helps you.

Regards,

Jayapradha





CONFIRMATION

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.

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

;