Need a special offer?Find out if your project fits.
+

determine when all drawing has finished for grid

Resolved
Michael T asked on June 14, 2021

When i put statements to trace aftergriddraw,
if the rows can all be shown on the screen, aftergriddraw is called twice,
both times with smooth == false.
 
if rows exceed screen size, aftergriddraw is called three times. 
Twice with smooth == false, followed by 
Once with smooth == true.
This appears to be contrary to documentation at https://www.flexmonster.com/api/aftergriddraw/, 
Questions:
1) is the documentation wrong, or am I doing something wrong?
2) How can we determine when the grid has finished drawing all rows (including 'row/column' and 'pixel'? (Using smooth == true only occurs if the rows exceed screen size, so it will not work as a method to know when drawing is complete.)

If it is a bug, will you change it so that smooth == true is always called when it is finished drawing? (or will you have some other variable available to the callback parameter like 'finishedDrawingAllRows == true')

Thank you
 

3 answers

Public
Milena Pechura Milena Pechura Flexmonster June 16, 2021

Hello, Michael,
 
Thank you for writing to us.
 
Our team has carefully checked all provided information.
Find our answers to each of your questions below.

  1. Please note that the documentation for the aftergriddraw event is provided in a little simplified form. The event will be triggered as many times as the grid is redrawn. Therefore, its logic is quite tricky: the event can be thrown a different number of times depending on the case. 
  2. To find a suitable solution, we would like to ask you some clarifying questions.
    Could you please inform us how you plan to use that "finish of drawing all rows" event? What are you trying to achieve with it?
    This info will greatly help us in our investigation.

Looking forward to your response.
 
Best regards,
Milena

Public
Michael T June 16, 2021

Thanks for your response.
 
It's good to know that it's a simplification.
Knowing that, I found a better way of what I was trying to do. 
It may be a good idea to clarify in the documentation that it can be called multiple times. I had an algorithm that relied on the description in the API documentation.
 
Thanks
 

Public
Milena Pechura Milena Pechura Flexmonster June 17, 2021

Hello, Michael,
 
Thank you for your answer.
 
We are glad to hear that you have found a solution for your case.
Our team will improve the documentation for the aftergriddraw event, so it will contain all necessary details in the nearest future.
 
Do not hesitate to contact us if any questions arise.
 
Kind regards,
Milena

Please login or Register to Submit Answer