Datagrid column label

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Datagrid column label

Post by bsouthuk » Mon Jul 06, 2015 12:31 pm

Hi

I am trying to change a column label within a datagrid dynamically.

Does anybody know the code for this?

Your help is most appreciated.

Many thanks

Daniel

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Datagrid column label

Post by Klaus » Mon Jul 06, 2015 1:14 pm

Hi Daniel,

to GET and SET a CR delimited list of all curent column labels do this:
...
put the dgprops["column labels"] of grp "Your DG here" into tLabels
...
set the the dgprops["column labels"] of grp "Your DG here" to "Label ONE" & CR & "Label 2" & CR & "Label 3"
...

To get and set the label of a specific column:
...
put the dgColumnLabel["name of column here"] of grp "Your DG here" into tColumnLabel
...
set the dgColumnLabel["name of column here"] of grp "Your DG here" to "New label for the column"
...

All this is in the (only) DG docs, that you can get here: http://lessons.runrev.com/m/datagrid


Best

Klaus

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Datagrid column label

Post by bsouthuk » Mon Jul 06, 2015 1:26 pm

Great thank you very much Klaus.

Post Reply