DataGrid form dynamic row height out of sync in LayoutControl when acceleratedRendering is true
Posted: Thu Oct 08, 2026 6:14 am
Hi everyone,
I am working on a LiveCode Indy stack with a DataGrid configured in form mode (dgProps["fixed control height"] = false) where each row template contains a variable-length text field (ColTitle) and a thumbnail image (ThumbPreview) loaded dynamically.
When acceleratedRendering is set to true on the stack and the DataGrid's layerMode is scrolling, scrolling down past row 14 causes visual row overlap because the formattedHeight of field "ColTitle" of me inside LayoutControl appears to be cached before the thumbnail finishes resizing the row rect (I also added my diagnostic screenshot tool link under my profile Website icon, capture ID b2ac5227881a48).
Here is the handler inside the row behavior script:
If I call dispatch "ResetList" to group "DataGrid 1", it recalculates the row heights properly, but it also resets the user's vertical scroll position back to 0. Is there a recommended DataGrid helper command (such as RefreshIndex or clearing the internal height cache for a single line) that updates the row rect without losing the current dgVScroll position?
Thank you!
I am working on a LiveCode Indy stack with a DataGrid configured in form mode (dgProps["fixed control height"] = false) where each row template contains a variable-length text field (ColTitle) and a thumbnail image (ThumbPreview) loaded dynamically.
When acceleratedRendering is set to true on the stack and the DataGrid's layerMode is scrolling, scrolling down past row 14 causes visual row overlap because the formattedHeight of field "ColTitle" of me inside LayoutControl appears to be cached before the thumbnail finishes resizing the row rect (I also added my diagnostic screenshot tool link under my profile Website icon, capture ID b2ac5227881a48).
Here is the handler inside the row behavior script:
Code: Select all
on LayoutControl pControlRect, pWorkingRect
local tFieldRect
put the rect of field "ColTitle" of me into tFieldRect
put item 2 of pControlRect + the formattedHeight of field "ColTitle" of me into item 4 of tFieldRect
set the rect of field "ColTitle" of me to tFieldRect
end LayoutControl
Thank you!