Hi,
i'm using an UltraGrid with
DisplayLayout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnTop;
Now, if i add some new rows (just type and press enter) and then i press cursor-down, to get to the first data row, UltraGrid is jumping to the second row o.O
To Reproduce:
- Create a new Form
- Put an UltraGrid on it
- call this function to set the options:
public void initTest(UltraGrid dfG) { dfG.DisplayLayout.AutoFitStyle = AutoFitStyle.ExtendLastColumn; dfG.DisplayLayout.GroupByBox.Hidden = true; dfG.DisplayLayout.Override.AllowAddNew = AllowAddNew.FixedAddRowOnTop; dfG.DisplayLayout.Override.AllowDelete = DefaultableBoolean.True; dfG.DisplayLayout.Override.CellClickAction = CellClickAction.CellSelect; dfG.DisplayLayout.Override.CellMultiLine = DefaultableBoolean.False; dfG.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; dfG.DisplayLayout.Override.RowSizing = RowSizing.AutoFree; }
- now enter a few rows
- now try to go down with Cursor... you will jump one row too far
Is there a work-around for that?
I tried creating a sample using your code and I am unable to see the problem you describe.
I am attaching my sample project here so you can try it for yourself and see if you get the same results. Here's what I did:
1) Run the sample.
2) Click on the first cell.
3) Since you have CellClickAction set to CellSelect, you have to press F2 to put the cell into edit mode.
4) Type some text and hit enter.
5) Repeat step 4 a few times.
6) Press the down arrow key.
The down arrow key does not do anything. It does not skip a row, nor does it move to the next row - which is by design. If your arrow key is moving to another row, then my guess is that you are handling some event of the grid (like KeyDown) and setting focus to another row, and maybe there is an error in that code.
i've attached a video showing the Cursor-Down-Problem
We are using Version 14.2 so i have updated the references of your example - and i have the same problem as i described:
- F2 (to enter edit mode on the first column)
- Enter something and hit Enter
- (do it 4 times or so)
- Press F2 again (to exit edit mode)
- Press Cursor-Down -> Find yourself in the second data row :)