Grid control creation

Hello everyone,

Version: 25.2.6.2 (X86_64) / LibreOffice Community
Build ID: 729c5bfe710f5eb71ed3bbde9e06a6065e9c6c5d
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 26200); UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-US
Calc: threaded

I’m building on my previous post (Boundfield property), with a similar issue, where @cpb, @Villeroy and @CRDF were kind enough to help me out. Seems that my original problem still seems to prevail. As per the following file: control table issue.odb (13.5 KB)
I am creating a form with a grid control on it. The only problem that I have is that once everything loads, I need to click the ‘design mode’ button twice (ie. enter and exit that mode) for the textbox in the grid control to populate. It’s as if the form needs to reload, which I am doing in my code already. Any help would be greatly appreciated.

@Villeroy I’m not sure if that response was meant for my post? It seems to be not related to my question. Could it be that you’re thinking of someone else’s post?

Indeed, I had a notion that this might be a follow up of yesterday’s topic. Libre base - Count boolean fields
Sorry for the noise.

EDIT I have replaced my original comment.
.
in Sub ‘prepareCanvas’
replace
wslController.setFormDesignMode false
with
wslController.setFormDesignMode true
AND
in Sub ‘addGrid’
replace
oForm.reload()
with
oForm.parent.parent.currentcontroller.formdesignmode = false
.
in sub ‘addForm’ you used oDBForm.dataSourceName = "control table issue"
I replaced that with oDBForm.dataSourceName = thisdatabasedocument.location

1 Like

Makes perfect sense… you want it to be in design mode until you are finished adding your components. Thank you so much!!!