What you are looking for is dgProp [“column widths”] which takes a comma delimited list.
The API for datagrid properties is here: https://lessons.livecode.com/m/datagrid/l/7343-data-grid-properties Bob S > On Mar 3, 2025, at 12:47 PM, Craig Newman via use-livecode > <use-livecode@lists.runrev.com> wrote: > > Hi. > > It is likely that the dgColumnWidth has to act on each column individually, > and is accessed in array notation, as in, for example: > > set the dgColumnWidth[“col1”] to yourWidthHere > > You can loop through all the columns that way, I suppose. > > Craig > > >> On Mar 3, 2025, at 2:41 PM, jbv via use-livecode >> <use-livecode@lists.runrev.com> wrote: >> >> Hi list, >> >> I have a datagrid with dgStyle as "table". >> I have populated the columns and the dgText. >> Now I need to adjust the width of each column by script : >> >> put "100,120,150" into Lw >> set the dgColumnWidths of group "DataGrid 1" to Lw >> >> But nothing changes when running the above commands. >> What am I doing wrong ? >> >> Thank you in advance. >> jbv >> >> _______________________________________________ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode