I have a strange effect.
If the ZQuery is opened and the display format is set for a DateTime field and the DateTime field is empty in the first record, the focus in the DBgrid is drawn incorrectly. The internal data record pointer was probably changed by "DisplayFormat" ?
See attachement
The focus is on the first sentence with a date. The record pointer is on record 1.
Norbert
DisplayFormat and DBgrid
DisplayFormat and DBgrid
You do not have the required permissions to view the files attached to this post.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: DisplayFormat and DBgrid
Hello Norbert,
I can confirm the problem on Delphi XE7. This doesn't happen on Lazarus. I also did the same thing with FireDAC and ODBC using SQL Native Client. It didn't happen there.
Bu then - I am not sure - how does DBGrid decide where to draw the focussed cell and where to draw the triangle? Usually I would expect the DBGrid to keep these things in sync?
Best regards,
Jan
I can confirm the problem on Delphi XE7. This doesn't happen on Lazarus. I also did the same thing with FireDAC and ODBC using SQL Native Client. It didn't happen there.
Bu then - I am not sure - how does DBGrid decide where to draw the focussed cell and where to draw the triangle? Usually I would expect the DBGrid to keep these things in sync?
Best regards,
Jan
Re: DisplayFormat and DBgrid
Nope. It's the dumbest feature of vanilla dbgrid IMHO and it lasts from the very beginning.marsupilami wrote: ↑27.07.2022, 16:20 Bu then - I am not sure - how does DBGrid decide where to draw the focussed cell and where to draw the triangle? Usually I would expect the DBGrid to keep these things in sync?
Re: DisplayFormat and DBgrid
I'm running Delphi 10.4 and this only happens with ZQuery.
This does not happen with the FireDAC query or any other query.
I also often use the RxMemoryTable, and this effect does not occur there either.
Something is misaligned when setting "DisplayFormat". Does the ZQuery look for the first record where the format can be applied?
Norbert
This does not happen with the FireDAC query or any other query.
I also often use the RxMemoryTable, and this effect does not occur there either.
Something is misaligned when setting "DisplayFormat". Does the ZQuery look for the first record where the format can be applied?
Norbert
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: DisplayFormat and DBgrid
Do you know how this happens? What makes DBGrid do this?Fr0sT wrote: ↑28.07.2022, 08:22Nope. It's the dumbest feature of vanilla dbgrid IMHO and it lasts from the very beginning.marsupilami wrote: ↑27.07.2022, 16:20 Bu then - I am not sure - how does DBGrid decide where to draw the focussed cell and where to draw the triangle? Usually I would expect the DBGrid to keep these things in sync?
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: DisplayFormat and DBgrid
No, the described case is surprise for me, I'm just saying that for DBGrid it's normal to have dataset cursor and focused cell indicator non-synced