Datagrid Question

zryip theSlug zryip.theslug at
Tue Sep 20 14:40:15 EDT 2011

On Tue, Sep 20, 2011 at 5:22 AM, Marty Knapp <martyknapp at> wrote:
> I have a datagrid with several columns, column 4 of which contains a number.
> Under the datagrid I have placed a field that keeps a total of the values in
> this column. I would like this field to match the width of column 4 and
> align itself directly under it so that if a user changes the column width,
> my total field will realign itself with the width and placement of the
> column. How would I go about doing this?

Hi Marty,

A possible solution is to use the datagrid's dgColumnWidth property,
inside the datagrid group script, to get the size of a column being

setprop dgColumnWidth [pColumn] pValue
  put pColumn & "Sum" into tTheSumField
  updateRectOfField tTheSumField, pValue

  pass dgColumnWidth
end dgColumnWidth

- pColumn is the column name
- pValue is the column width

Best regards,
-Zryip TheSlug- wish you the best! 8)

More information about the Use-livecode mailing list