TDbAdvGrid seems block other display even showmessage will get halt if I called from the trigger event.

Dear all,

TDbAdvGrid seems block other display even showmessage will get halt if I called from the trigger event.

It seems the whole grid block other display event. If I click the header of column, it also does not show the arrow but code is correct in CanSort event.

Anyone give me hints ? I think there is some missing or enable something..

From which event are you calling ShowMessage ?

I found out why but still do not know how come.

This grid has several columns and column 1 is display the certificate name but this field is a lookup field , not a physical exists on data entry for this grid.

Even I tried to showmessage from anywhere or add showmessage on the button and get call showmessge. it feeze...
why ?
any hints ?

From your information, I do not have any idea of what exactly you are doing, what exactly the problem is and how to even start to try to reproduce it here.

I found where caused the freeze or halt if any where call showmessage..
If I remove the 'Expiry Date' color conditional setting in code, then no halt.

Am I right I put those code in here or I should not put it in here ?

if I remove code which marked in red color box, then no halt happen... why ?

You should not use OnGetDisplText to set cell color / text color.
The event OnGetCellColor is designed for that. So, separate this functionality.

But there is NO 'Value' in OnGetCellColor event.. So how can we get the current row of specific column value ?

It has ARow and ACol, so you can access the value using these coordinates, for example via Cells[ACol,ARow] or Floats[ACol,ARow]

1 Like