Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
660
Using FixedAddRowOnTop - Cursor-down selecting second instead of first row
posted

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?
Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    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.

    WindowsFormsApplication83.zip
Children