Posted 28 October 2026, 3:11 pm EST
Hi,
We’re using C1FlexGrid 2025v2 (C1.Win.FlexGrid.4.8, 4.8.20252.740) in a .NET Framework 4.8
The grid is bound to a List(Of T) with about 210,000 rows × 29 columns. Loading takes about 1.2 s. the form then stopped responding for 20–43 s, and again for about 20 s after a sort. During the freeze, process memory went from about 114 MB to 451 MB.
Stack samples of the UI thread during the freeze are all under DispatchMessageW, in UI Automation calls coming from another process:
MS.Internal.Automation.UiaCoreProviderApi.RawUiaHostProviderFromHwnd
System.Windows.Automation.Provider.AutomationInteropProvider.HostProviderFromHandle
...IRawElementProviderSimple.get_HostRawElementProvider
System.StubHelpers.BSTRMarshaler.ConvertToNative / ObjectMarshaler.ConvertToNative
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW
The PC runs several UI Automation clients (ChatGPT desktop, Windows Click to Do, TeamViewer, Logi Options+). It looks like one of them walks every cell of the grid, with each call marshalled to our UI thread.
As a workaround we put a NativeWindow on the grid handle that returns 0 for WM_GETOBJECT with UiaRootObjectId. With that in place there is no freeze, and memory stays at about 115 MB:
Protected Overrides Sub WndProc(ByRef m As Message)
If m.Msg = &H3D AndAlso (m.LParam.ToInt64 And &HFFFFFFFFL) = &HFFFFFFE7L Then 'WM_GETOBJECT, UiaRootObjectId
m.Result = IntPtr.Zero
Exit Sub
End If
MyBase.WndProc(m)
End Sub
And that fixed the issue
Questions:
- Is there a supported way to turn off UI Automation for a C1FlexGrid, either per grid or for the whole app?
- Does the FlexGrid UI Automation provider support virtualization (ItemContainer / VirtualizedItem patterns), so a client only gets the visible rows instead of every cell?
Thanks
