Jean-Marc Kiener Posted February 8, 2019 Share Posted February 8, 2019 Hi, i updated to unigui version 1.50.0.1482. Now i have a problem in a modal search form who contains a TUniDBGrid. The grid has dgRowSelect, dgCheckSelect and dgMultiSelect set to true, so the user can select serveral rows with the keyboard. When hit the enter key i take the selected rows and do some things. I have a OnKeyDown event on the grid to catch enter key. Before updating to the new version all works like expected. Now the behaviour of the grid has changed. Immediatly after hitting enter key the selection is lost. I am not able to get the selected rows and take some action with the enter key. You can try it for yourself in "GridCheckSelect" demo. Add a OnKeyDown event handler to the grid and see whats happening. Selection is lost after hitting the enter key. Is this a bug or a wanted new behaviour of the Grid? Quote Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted February 11, 2019 Author Share Posted February 11, 2019 I am not shure if i wrote my post to complicated.. I just want to know how i can get the selected rows if i press the enter key. it seems that the grid lost the selected items if i press enter before a key event occurs. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 11, 2019 Share Posted February 11, 2019 On 2/8/2019 at 7:02 PM, Kiener said: Selection is lost after hitting the enter key. Hi, Sorry for the late reply. I'm also not sure is this normal behavior or not? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 11, 2019 Share Posted February 11, 2019 23 minutes ago, Sherzod said: I'm also not sure is this normal behavior or not? Can you try this approach for now?: function beforecellkeydown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts) { if (e.keyCode == 13) { e.ctrlKey = true; } } Quote Link to comment Share on other sites More sharing options...
Jean-Marc Kiener Posted February 11, 2019 Author Share Posted February 11, 2019 Works fine. Thank you very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.