rhazell Posted October 11, 2023 Share Posted October 11, 2023 Can anyone explain why (or what would cause) UniDBGrid.RecordCount event to be called several times upon the creation and initial display of a form? In fact, it's called approximately 6 times before the form finishing loading. Even weirder, it appears to be called even before the table has even been opened, based on my logging snippet below: [2 µs][Trace][Value: TframeItem.UniFrameCreate][Type: string] [1040 µs][Trace][Value: TframeItem.UniFrameBeforeReady][Type: string] [25689 µs][Trace][Value: TframeItem.UniFrameReady | begin][Type: string] [29 µs][Trace][Value: TframeItem.tblItem_BeforeOpen][Type: string] [5420560 µs][Trace][Value: TframeItem.UniDBGrid1RecordCount][Type: string] [1876286 µs][Trace][Value: TframeItem.UniDBGrid1RecordCount][Type: string] [18 µs][Trace][Value: TframeItem.UniDBGrid1RecordCount][Type: string] [1196 µs][Trace][Value: TframeItem.tblItem_AfterOpen][Type: string] [2 µs][Trace][Value: TframeItem.tblItem_AfterScroll | begin][Type: string] Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted October 11, 2023 Administrators Share Posted October 11, 2023 Hi, First of all this event is rarely used by developers. It is only used if you need to explicitly tell the grid the dataset record count. Otherwise Grid retrieves it from the dataset. It is queried each time an ajax event is received to see if it is needed to refresh the grid rows. 1 Quote Link to comment Share on other sites More sharing options...
rhazell Posted October 11, 2023 Author Share Posted October 11, 2023 I assume that means I need not be concerned the number of times it appears to be called. That's great. Thanks you. It really only came onto my radar because I have several (relatively simple) forms with a UniDBGrid that are taking very long to load and I am trying to determine the root cause. It could be my understanding / approach but I'm having a hard time understanding (and measuring) where the delays are occurring (data access vs rendering etc)... Do yo have any suggestions? 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.