@peter

@peter

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • in reply to: Selecting a grid-cell #104800
    Peter
    Participant

    Oh, how did I not see this… Sorry about that…

    I’m not interested in not ending the edit, I want that, I just don’t want focus to switch to the row below, but instead to next column on the same row, like Tab does.
    Hope I can make that happen now, if I spell Enter correctly…

    in reply to: Selecting a grid-cell #104783
    Peter
    Participant

    That is what I have been trying, but it does not work.

    onKey(e)
        {
            console.log('e.key: '+ e.key);
            
            if (e.key === 'Ener')
            {
                e.preventDefault();            
            }
        }

    Despite of this, the Enter key still ends editing and moves focus to the cell below on the next row.

    in reply to: Selecting a grid-cell #104776
    Peter
    Participant

    Ok thank you, that makes sense then.

    How about preventing Enter key from navigating down in the rows?

    I would actually like Enter to act the same way as Tab , which currently ends the ends the editing and moves on to the next cell on the same row.

    Pressing Enter however, ends the editing and moves to the cell below in the same column (aka on the next row).

    • This reply was modified 1 year ago by Peter.
    • This reply was modified 1 year ago by Peter.
    in reply to: Selecting a grid-cell #104757
    Peter
    Participant

    Can you tell me why it is that selection made with Tab key, doesn’t trigger ‘change’ event?
    And if so, how I can make it happen?

    Right now I can navigate back and forth in the grid with arrow keys and they trigger ‘change’ every time, but Tab doesn’t for some reason.

    in reply to: Selecting a grid-cell #104730
    Peter
    Participant

    So since the onKey() catches the tab-key before the cell selection changes, I can overwrite the behavior which is good, but there is still an issue that I don’t quite get and that is why the ‘change’ event doesn’t fire when the cell selection is made with the tab-key.
    The arrow-keys do make the ‘change’ event fire, but not the tab-key…
    Is there a way to get the selected cell as a result of tab-key being pressed? – other than looking at the previous column and then seeing what’s next in line (if any)?

    in reply to: Selecting a grid-cell #104729
    Peter
    Participant

    Yup I fixed it now – I wasn’t aware that the onKey triggers before the event occurs and so I can at this point check which is the current column.

    in reply to: Selecting a grid-cell #104724
    Peter
    Participant

    I can see that I can disable Tab navigation all together this way, but I actually want the Tab navigation, I just want to prevent Tab on the last cell, to move to the row below (or in my case create a new row, if current row is the last row in the grid).

    So that Tab just runs through the cells of the current row and stays on that current row, also when the last cell is reached, in which case navigation should go back to the first cell.

    Another thing is that I have noticed something a bit odd about the Tab navigation. If I navigate through the cell with the arrow keys, the ‘change’ event fires, but when I navigate through the cells with Tab, the ‘change’ event is not fired.

    in reply to: Selecting a grid-cell #104718
    Peter
    Participant

    Please – Is there a way to prevent TAB from navigating to the next row (or creating a new one) when pressed from the last column in the grid?

    in reply to: swtiching data set for grid #104716
    Peter
    Participant

    That works – I thought that was what I was doing but apparently I was doing something wrong in my previous code.

    in reply to: Selecting a grid-cell #104704
    Peter
    Participant

    OK, so it turned out that there was a method focusAndSelect() that I should use instead of selectCells() which I had missed – methods not listed alphabetically…

    Anyway, using this instead fixed the problem I had.

    Is there a way to prevent TAB from navigating to the next row (or creating a new one) when pressed from the last column in the grid?

    in reply to: Selecting a grid-cell #104691
    Peter
    Participant

    link to demo app and video showing the problem sent.

    in reply to: swtiching data set for grid #104665
    Peter
    Participant

    Well I had a function that did the entire Smart('#grid', class... thing, and I called that when the data changed, but this was where I noticed that the data in the grid, stayed the same even though the data that was being put into the data adapter as data source, was a new set of data.

    So what part of the grid initialization should be redone (if not all) to switch out all the data in the grid, if not the entire Smart('#grid', class... section?

    in reply to: Grid Cell selection changed #104658
    Peter
    Participant

    Thank you, I will look into that.

    in reply to: Cell Value Format #104655
    Peter
    Participant

    In response to this (#104637), I can say that the ‘decimalSeparator’ seems to work, but the ‘thousandsSeparator’ is ignored.

    in reply to: Cell Value Format #104654
    Peter
    Participant

    Nevermind this – I have now changed the field from number to string … There are way too many problems when using number apparently.
    Either there are problems formatting the value in display mode or when in the open editor, or else there are problems (only sometimes though) when trying to type e.g. 300 the editor only allows me to type 30 and then ignores any further zeros being typed.

Viewing 15 posts - 1 through 15 (of 39 total)