Page 1 of 1

Data Grid property names

Posted: Tue Jul 21, 2009 6:50 pm
by phaworth
Data Grids are working great fro me now, thanks to yhose who helped.

I have one more piece of the puzzle left. I have a handler that determines excatly what type of object is currently selected (field, list, combbobox, check box, etc) by looking at the object type in conjunction with things like the style property. I see that data grids are group objects but is there some other property I can check that will tell me it's a data grid?

Thanks,
Pete

Posted: Wed Jul 22, 2009 6:12 am
by Janschenkel
Hmm, I'd say your best bet is to check for the presence of the 'dgData' custom property set.

Code: Select all

function isDatagrid pLongId
  if word 1 of pLongId is "group" and "dgData" is among the lines of the customPropertySets of pLongId
  then return true
  else return false
end isDatagrid
Jan Schenkel.

Posted: Wed Jul 22, 2009 8:58 am
by trevordevore
One small tweak Jan. Change dgData to dgProps and your handler should be good to go.

Posted: Wed Jul 22, 2009 12:17 pm
by Klaus
Or try this prop, which is meant for exactly this purpose :)

Code: Select all

function isDatagrid pLongId
    return (the dgProps["control type"] of pLongID = "Data Grid")
end isDatagrid
Best

Klaus

Posted: Wed Jul 29, 2009 1:51 am
by phaworth
Thanks all, been out of town for a few days but just tried the last dgProps suggestion and it works fine.