Hi, there
We are using Infragistics WPF4 version 10.3. And I'm running into this issue that I desparately need some help. Here's the requirement:
this.gridWantListItems.ActiveRecord = gridWantListItems.RecordManager.CurrentAddRecord;
this.gridWantListItems.ActiveCell = gridWantListItems.RecordManager.CurrentAddRecord.Cells[0];
//CellValuePresenter cvp = CellValuePresenter.FromCell(gridWantListItems.ActiveCell);
//cvp.Editor.StartEditMode();
// enter edit mode
this.gridWantListItems.ExecuteCommand(DataPresenterCommands.StartEditMode);
The problem is that the cell does not go into edit mode. The same code executes in grid Loaded event, and the cell was put in edit mode. But here it does't. Notice the commented out line of CellValuePresenter code. If I uncomment that code, I can see cvp is null. Could this be the reason that StartEditMode does not put my cell into edit mode?
Any suggestion on how I can get the cell into edit mode?
Thanks.
Hello rzhu,
I was looking into you requirements and I can suggest you add the following code to the RecordUpdated event of the XamDataGrid:
private void xdg_RecordUpdated(object sender, Infragistics.Windows.DataPresenter.Events.RecordUpdatedEventArgs e)
{
//// enter edit mode
this.xdg.ActiveCell = (xdg.ActiveRecord as DataRecord).Cells[0];
this.xdg.ExecuteCommand(DataPresenterCommands.StartEditMode);
}
This will force the first cell of the new added row automatically to get in edit mode right after the new row is being added. After this initial editing you can use the same event to restrict the cells to became read only, once this user navigates outside the row.
If this doesn’t suit your scenario, could you please provide me with a small sample where the issue you are describing is reproducible, so I can continue investigating this.
I am just checking have you been able to resolve your issue? If you still need any assistance on the matter do not hesitate to ask.