Jump to content

How to disable /HandleEvent requests as I scroll TUnimDBGrid


Mehmet Emin

Recommended Posts

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

  • 8 months later...
  • 7 months later...

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

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

 

 

 

  • Like 1
Link to comment
Share on other sites

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

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.

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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

×
×
  • Create New...