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 detailsView when exiting cell editing

Hello,

How to close all DetailsView, in SfDataGrid, automatically when exiting cell editing, in the master grid, with Enter key?

I have tried to use myDataGrid.CollapseAllDetailsView(); in CurrentCellEndEdit event, but it doesn’t work. 

The cell selection takes the first cell of my DetailsView grid instead of the following cell.

Other try: CurrentCellActivating event isn’t thrown when I use Enter key but works correctly when I change selection by mouse click when detailsview is expanded.


Regards,

Aurélien


Attachment: Document_6408b767.zip

3 Replies

SP Sowndaiyan Paulpandi Syncfusion Team February 2, 2016 01:03 PM UTC

Hi Aurelien,

Thanks for contacting Syncfusion Support.

You can achieve your requirement within the SfDataGrid.SelectionChanged Event based upon the RowIndex. We have prepare a sample as per your requirement and you can download the same from the below location,

Sample : http://www.syncfusion.com/downloads/support/forum/121853/ze/8.1-1066880894



Regards,

Sowndaiyan



AU Aurélien February 3, 2016 09:33 AM UTC

Hello,

Thanks for you sample. That works well.
But I would like the following cell be in editing mode automatically.
This works when the details view is collapsed but doesnt work when it is open and collapsed automatically by the event.
You can see my test on the following sample in attachment.

Regards,
Aurélien

Attachment: 8.1_2be08da3.zip


SP Sowndaiyan Paulpandi Syncfusion Team February 4, 2016 06:10 AM UTC

Hi Aurelien,

You can achieve your requirement by invoking the SfDataGrid.SelectionController.CurrentCellManager.BeginEdit() method before Collapse the DetailsViewGrid. We have modified the sample as per your requirement and you can download the sample from the below location,

Sample :
http://www.syncfusion.com/downloads/support/forum/121853/ze/WinRT_Sample-1262509974

Regards,

Sowndaiyan


Loader.
Live Chat Icon For mobile
Up arrow icon