Posted 30 December 2025, 5:30 am EST
Hi,
Thank you for sharing your sample code. We tested it and observed approximately 900-1000ms to create 100 instances when setting the BorderStyle property.
When BorderStyle is set, the FlexGrid must update its window frame. This cannot be handled purely in managed code, so internally it triggers Win32 calls (Win32.FrameChanged) to let Windows recalculate and redraw the control’s borders. These native operations are relatively expensive, and their cost can vary depending on OS version, DPI/theme settings, and hardware. This explains why you may see different total times (for eg, ~900-1000ms on our machine versus ~1.8 seconds on yours).
That said, since you are using an old version of FlexGrid, there have been many internal changes since then. Could you please test the same scenario with the latest 2025v2 release and let us know the timings? We have attached a sample project using the latest version.
Attachment: FlexGridLoadingTimes.zip
Additionally, creating a large number of FlexGrid instances is generally not a recommended or representative usage pattern. FlexGrid is a relatively heavy, windowed UI control that allocates internal resources and participates in layout and message processing, so it is designed to be created in comparatively less numbers and reused, or created lazily when required, rather than instantiating many of them at application startup.
Could you please let us know if there is a specific use case or requirement that requires creating such a large number of FlexGrid instances? Understanding the scenario will help us suggest a more appropriate or optimized approach, if possible.
Best Regards,
Kartik