Hide DataGrid column on the fly
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hide DataGrid column on the fly
I know I can hide a button under program control with a command like:
set the visible of button "MyButton" to false
I would like to be able to hide a column of a datagrid on the fly. I have tried things like:
'set the visible of column "MyCol" of group "DataGrid 1" to false' - but I get an error message.
It can be done in the Property Inspector so there must be a way under program control.
Any suggestions?
Thanks,
Larry
set the visible of button "MyButton" to false
I would like to be able to hide a column of a datagrid on the fly. I have tried things like:
'set the visible of column "MyCol" of group "DataGrid 1" to false' - but I get an error message.
It can be done in the Property Inspector so there must be a way under program control.
Any suggestions?
Thanks,
Larry
-
- VIP Livecode Opensource Backer
- Posts: 163
- Joined: Tue Jan 26, 2010 10:15 pm
- Contact:
Re: Hide DataGrid column on the fly
Hi Larry,lohill wrote:I know I can hide a button under program control with a command like:
set the visible of button "MyButton" to false
I would like to be able to hide a column of a datagrid on the fly. I have tried things like:
'set the visible of column "MyCol" of group "DataGrid 1" to false' - but I get an error message.
It can be done in the Property Inspector so there must be a way under program control.
Any suggestions?
Thanks,
Larry
Try:
Code: Select all
set the dgColumnIsVisible["myCol"] of grp "myDatagrid" to false
- myCol is the name of the column to hide
- myDatagrid is the name of the datagrid
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel
Re: Hide DataGrid column on the fly
Hi Larry,
...
set the dgColumnIsVisible ["Your column name here"] of grp "Your datagrid here" to FALSE
..
Not tested, but should work
Please load this PDF as the one and only DataGrid reference:
http://lessons.runrev.com/s/lessons/m/datagrid/pdf
Best
Klaus
...
set the dgColumnIsVisible ["Your column name here"] of grp "Your datagrid here" to FALSE
..
Not tested, but should work

Please load this PDF as the one and only DataGrid reference:
http://lessons.runrev.com/s/lessons/m/datagrid/pdf
Best
Klaus
Re: Hide DataGrid column on the fly
Damn, one minute too late for my excellent hint 

Re: Hide DataGrid column on the fly
Thank you Gentlemen,
The dgColumnsVisible command is not present on the eight or so pages of datagrid commands I keep in from of at all times. It has now been added to my list.
Regards,
Larry
The dgColumnsVisible command is not present on the eight or so pages of datagrid commands I keep in from of at all times. It has now been added to my list.
Regards,
Larry
Re: Hide DataGrid column on the fly
Whoops - That should be dgColumnIsVisible - singular column 'invisible.
Thanks again
Thanks again