SfData Grid Edit

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

2 Replies

MN MAHESH NARAYANAN V V 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? 


JS Jayapradha S Syncfusion Team 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





Loader.
Up arrow icon