Page 1 of 1

How to see the difference between a group and a DataGrid via script

Posted: Fri Jan 11, 2019 8:52 pm
by mrcoollion
Hi fellow LiveCoders,

Can anybody show me how I can see the difference between a group and a DataGrid via script.
I tried the below options but no luck ...

Code: Select all

Get the kind of control ID tControlIDNumber

Code: Select all

Put the style of control ID tControlIDNumber into tControlStyle
Regards,

Paul

Re: How to see the difference between a group and a DataGrid via script

Posted: Fri Jan 11, 2019 9:01 pm
by Klaus
Hi Paul

this should do the job:

Code: Select all

...
if the dgprops["control type"] of grp "your datagrid group here" = "Data Grid" then
     answer "I am a datagrid, yay!"
else
    answer "I am not a datagrid, ohhhh!"
end if
...
Or maybe:

Code: Select all

...
if lineoffset("dgprops",the custompropertysets of grp "your group in question here") <> 0 then
     answer "I am a datagrid, yay!"
else
    answer "I am not a datagrid, ohhhh!"
end if
...
Best

Klaus

Re: How to see the difference between a group and a DataGrid via script

Posted: Fri Jan 11, 2019 9:29 pm
by mrcoollion
Thanks Klaus for helping me out.

And of course it works......

Regards,

Paul