I have a grid with addnew row at bottom
When i?m adding a row and press ENTER in the first cell of the new row
the grid position in the addrow template instead of staying in the row i'm entering
How can i prevent the grid from changing row?
What setting are you using for AllowAddNew? Is the AddRow at the bottom of the band or fixed at the bottom of the grid?
i'm using addrow at the bottom
Sorry
I removed the ampérsand and now is working fine
Thanks
I used
For Each M In FICHAS_MUTUALESUltraGrid.KeyActionMappings If M.KeyCode = Keys.Enter & M.ActionCode = Infragistics.Win.UltraWinGrid.UltraGridAction.CommitRow Then FICHAS_MUTUALESUltraGrid.KeyActionMappings.Remove(M) End If Nextbut didnt work
What you probably have to do here is remove the KeyActionMapping from the grid's KeyActionMappings collection that is handling the enter key.
for (int i = this.ultraGrid1.KeyActionMappings.Count-1; i >= 0; i--) { GridKeyActionMapping gridMapping = this.ultraGrid1.KeyActionMappings[i]; if (gridMapping.ActionCode == UltraGridAction.CommitRow && gridMapping.KeyCode == Keys.Enter && (gridMapping.StateRequired & UltraGridState.AddRow) == UltraGridState.AddRow) { this.ultraGrid1.KeyActionMappings.Remove(gridMapping); } }
Hi,
That doesn't really answer the question. I need to know if the row is fixed or not. What setting are you using for AllowAddNew?