Mehmet Emin Posted May 30, 2021 Share Posted May 30, 2021 If I don't need to track/catch scroll events on the server how can I disable /HandleEvent to trigger after every scroll. Thanks Link to comment Share on other sites More sharing options...
Sherzod Posted May 30, 2021 Share Posted May 30, 2021 1 hour ago, Mehmet Emin said: If I don't need to track/catch scroll events on the server how can I disable /HandleEvent to trigger after every scroll. Hello, Could you please explain in more detail? What is the current behavior? Link to comment Share on other sites More sharing options...
Mehmet Emin Posted May 30, 2021 Author Share Posted May 30, 2021 When I scroll over the rows on the grid, fo each I get a server event "select". Link to comment Share on other sites More sharing options...
Sherzod Posted May 30, 2021 Share Posted May 30, 2021 7 minutes ago, Mehmet Emin said: When I scroll I couldn't reproduce this behavior. Link to comment Share on other sites More sharing options...
Mehmet Emin Posted May 30, 2021 Author Share Posted May 30, 2021 I will upload a test case to explain my question. Thanks very much Link to comment Share on other sites More sharing options...
Sherzod Posted May 30, 2021 Share Posted May 30, 2021 Ok, thanks. Link to comment Share on other sites More sharing options...
Mehmet Emin Posted May 30, 2021 Author Share Posted May 30, 2021 Here is the test project.zip, as you can see in the screenshot every scroll on my dbgrid generates an empty event on the server. Test_Project1.zip Link to comment Share on other sites More sharing options...
Mehmet Emin Posted June 1, 2021 Author Share Posted June 1, 2021 Hi @Sherzod Is this the expected normal behaviour? Should I expect to receive a HandleEvent call after every move to other row in this grid? I don't understand this. Link to comment Share on other sites More sharing options...
Sherzod Posted June 1, 2021 Share Posted June 1, 2021 Hi @Mehmet Emin Yes, this is normal behavior, it is necessary for immediate synchronization with the server. But if you want to delay syncing, you can use the following approach: function select(sender, selected, eOpts) { return false } 1 Link to comment Share on other sites More sharing options...
Mehmet Emin Posted June 1, 2021 Author Share Posted June 1, 2021 This is exactly what I was looking for. Thank you so much. 1 Link to comment Share on other sites More sharing options...
SISBLU Software Posted February 28, 2022 Share Posted February 28, 2022 1.90.0.1535 no WORK Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2022 Share Posted February 28, 2022 27 minutes ago, SISBLU Software said: 1.90.0.1535 no WORK Are you sure? Did you test with the above testcase? Link to comment Share on other sites More sharing options...
lema Posted October 16, 2022 Share Posted October 16, 2022 Hello ! I am also have disabled the dbgrid syncing (there were too many HandleEvents on scrolling), via: function select(sender, selected, eOpts) { return false } but, what can I do in case that I need to sync ondemand ? e.g. If I want to get the current record of underlying dataset. TIA, Lema Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2022 Share Posted October 16, 2022 8 minutes ago, lema said: there were too many HandleEvents on scrolling Hello, Describe the situation in more detail, and how many requests? Link to comment Share on other sites More sharing options...
lema Posted October 16, 2022 Share Posted October 16, 2022 38 minutes ago, Sherzod said: Hello, Describe the situation in more detail, and how many requests? Hello. My wrong phrase, it's not "too many..". Nothing abnormal. It's just the normal behavior of one Event on every grid moving (scrolling). But in my case, I need the less network traffic and best optimization, so I disabled the events with your approach. The question is, how can I get the underlying db record without syncing? Is there any workaround to get the appropriate fields (e.g. ID) from grid itself? Edit: I am using v. 1.90.0.1563 Complete 1 Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2022 Share Posted October 16, 2022 32 minutes ago, lema said: I am using v. 1.90.0.1563 Complete Thanks. 32 minutes ago, lema said: But in my case, I need the less network traffic and best optimization, so I disabled the events with your approach. Okay. But as you understand, synchronization is needed if you need to know on the server side, and also if your grid interacts with other dataset controls... 35 minutes ago, lema said: The question is, how can I get the underlying db record without syncing? Is there any workaround to get the appropriate fields (e.g. ID) from grid itself? If you are triggering an action from the client side, then you can use an additional event for this I think. Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2022 Share Posted October 16, 2022 55 minutes ago, lema said: But in my case, I need the less network traffic and best optimization, so I disabled the events with your approach. The question is, how can I get the underlying db record without syncing? Is there any workaround to get the appropriate fields (e.g. ID) from grid itself? Although check above solution again. It seems to work as you wanted. 1 Link to comment Share on other sites More sharing options...
lema Posted November 15, 2023 Share Posted November 15, 2023 Hello ! Can the same process be applied to the UniStringGrid? I want to disable the Event triggering on every StringGrid scrolling. function select(sender, record, index, eOpts) { return false } The method above doesn't work. I am using D11.3 and v.1.90.1576 Complete Link to comment Share on other sites More sharing options...
Sherzod Posted November 16, 2023 Share Posted November 16, 2023 6 hours ago, lema said: Can the same process be applied to the UniStringGrid? Hello, This post may help you: 1 Link to comment Share on other sites More sharing options...
Recommended Posts