Hi,
I am using a XamDataGrid with Virtualization enabled. When a cell is in edit mode and I press enter I need the cell of next row to be in edit mode.
This works fine for the records in view but when I movie to invisible records then I am able to navigate to them and select them but the cell is still not coming to edit mode.
Also for few cells the edit mode gets enabled while for most of them it still remains deactivated.
I have tried certain things like BringRecordIntoView, RecordNext but no luck.
Please help.
Hello Neelesh,
Thank you for your post!
I have been looking into it and it seems that I am missing something from your scenario. I have created a small sample application in order to test the functionality you have reported.
In the sample application I have a simple XamDataGrid, bound to a collection. I also have a button, that scrolls a record, that is not in view when the application starts, then makes the first cell of that record active and makes it to enter in edit mode.
Please note, that if you are using the StartEditMode command of the DataPresenterCommands - it places the cell, that is currently active in edit mode.
Would you please provide me with more detailed information about the scenario you want to achieve? Also if possible would you please modify the sample application with the functionality you are using, so it reproduces the issue?
Looking forward to hearing from you.
Hi Gergana,
I will try to clarify my query. I have a Xamdatagrid which is bound to some data source. When I double click on a cell it gets into edit mode as expected. Now with this cell in edit mode I press enter. What I want is when I press the enter button, the focus should move to next row and it's third field must get into edit mode.
For now when the Window loads there are 10 visible rows, when I edit the first row's field and press enter then the cell of next row gets into edit mode and this happens for all the rows in view. But when I press enter on the 10th row then the 11th row which is not visible doesn't enter the edit mode.
In the code you shared I have handled the PreviewKeyDown event and wrote following code
private void OnPreviewKeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Return) { igDataGrid.ExecuteCommand(DataPresenterCommands.RecordNext); igDataGrid.ActiveCell = (igDataGrid.ActiveRecord as DataRecord).Cells[0]; igDataGrid.ExecuteCommand(DataPresenterCommands.StartEditMode); } }
In this scenario even the next visible row in not entering the edit mode.
P.S. Virtualization is needed and enabled in the code.
I am using Infragistics version 12.2
I have been looking into your posts.
Would you please modify the sample application, that I have sent in one of my previous posts with the functionality you are using for finding the CellValuePresenter, so the issue is reproducible? Once you provide me with the sample application I would be able to further investigate this matter for you.
I have tried to replicate the issue in your code but was unsuccessful, might be because of the complexity of my code and the way it has been implemented. All I could help you is that the moment I execute RecordNext command the CellValuePresenter gets null and the cell refuses to go to edit mode.
Should I assume that this thread is dead now?
One last thing of anyone is looking at it. It I scroll till the bottom of the grid and then scroll back and now if I press enter after editing the cell then the next record's cell always enter the edit. Unlike the previous condition here the hidded records cell also get edited
Due to the virtualization of the XamDataGrid only the CellValuePresenters are created when the application is started. Would you please try calling the UpdateLayout method of the xamDataGrid, before trying to enter in edit mode. More about this method you can find here: http://help.infragistics.com/Help/Doc/WPF/2015.1/CLR4.0/html/InfragisticsWPF4.DataPresenter.v15.1~Infragistics.Windows.DataPresenter.XamDataGrid_members.html#.
Please do not hesitate to let me know if you have any further questions on this matter.
Still no luck
I have been looking into your post.
As the issue cannot be reproduced in the sample application I have provided in one of my previous responses I can suggest updating the version you are using to the latest version of our controls - 15.1.
If the issue is still reproducible in the latest version(15.1) we would need a simple isolated sample application, that shows the issue that you are seeing in order for us to be able to investigate this matter.