Author Topic: pqGrid Tree: Select a Row with hitting Enter  (Read 1744 times)

heinenf

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
pqGrid Tree: Select a Row with hitting Enter
« on: November 15, 2018, 02:12:28 pm »
Hello,

we are using a pqGrid with Tree that has only 1 column as a treecomponent. When we select a row this will trigger another grid to show some data. Out of the box it seems that when clicking Enter this will expand the tree but not select the row. We programmatically added a setSelection on beforeCellKeyDown-event to achieve the selection behavior but we are not able to supress the expand behavior on a click of Enter.

It seems that beforeTreeExpand-event happens before the beforeCellKeyDown event and therefore we don't know which event to use in order to achieve the function that a hit on enter will only select the row but not expand it.

Kind regards,
Conditio


heinenf

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: pqGrid Tree: Select a Row with hitting Enter
« Reply #1 on: November 15, 2018, 02:37:32 pm »
Got it now. I added

        if(event.keyCode === 13) {
          return false;
        }

into the beforeTreeExpand event