Hiding column data ....but how to hide Column itself ?

Moderators: heatherlaine, kevinmiller, robinmiller, Zryip TheSlug

Post Reply
teriibi
Posts: 254
Joined: Mon Nov 13, 2017 3:49 pm
Location: Bolivia

Hiding column data ....but how to hide Column itself ?

Post by teriibi » Thu Jan 18, 2018 9:39 pm

Hi, I can only Hide the DATA content of my specified Grid columns :!:

What´s the way to hide some selected Columns within a Datagrid, so that they do not even show on the Stack....¿
or that is not possible :?:

Code: Select all

on mouseup
   set the dgColumnIsVisible["colA"]of grp "DLand" to false
   set the dgColumnIsVisible["colB"] of grp "DLand" to false
end mouseup

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Hiding column data ....but how to hide Column itself ?

Post by Klaus » Thu Jan 18, 2018 10:09 pm

Hola teriibi,

you code works as advertized here in a fresh stack and a fresh datagrid with 2 columns:

Code: Select all

on mouseup
   set the dgColumnIsVisible["col 2"] of grp 1 to false
   set the dgColumnIsVisible["col 1"] of grp 1 to false
end mouseup
?

Best

Klaus

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

Re: Hiding column data ....but how to hide Column itself ?

Post by Zryip TheSlug » Thu Jan 18, 2018 11:35 pm

Assuming you are in the right forum and you are using the selecting column script of the DGH plugin:

Code: Select all

on mouseUp
   local tColumnToHide
   
   put the dghSelectedColumnName of grp "datagrid 1" into tColumnToHide
   set the dgColumnIsVisible[tColumnToHide] of grp "datagrid 1" to false
end mouseUp
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

Post Reply

Return to “Data Grid Helper”