Checkbox in datagrid column

Pete pete at mollysrevenge.com
Wed Dec 14 14:01:39 EST 2011


I'm not familiar with sqlyoga but I assume you have to set up a SELECT
statement to return the array so you should be able to include a constant (
eg 'false') in the SELECT statement which presumably would end up in the
array.  Something like:

SELECT thiscolumn, thatcolumn,theothercolumn,'false' FROM theTable....

Or maybe you need a CASE statement in the SELECT to figure out if there are
any links between the primary entry and the altData entry.

But if the external checkboxes look OK, that's all moot.
Pete


On Wed, Dec 14, 2011 at 10:45 AM, Bob Sneidar <bobs at twft.com> wrote:

> Hi and thanks for the reply.
>
> My problem is that I populate the datagrid by taking the array produced by
> sqlquery_retrieveDataAsArray from Trevor's sqlYoga library and setting the
> dgData of the datagrid to that. It's very fast and efficient, but of
> course, the SQL database does not have a checkbox column, and the values
> have to be set "on the fly", that is dependent on whether or not the
> altData record has a relational link to the primary data record.
>
> But all this is moot, because after thinking about it, I just created a
> group of checkbox buttons the size of my altData datagrid, and I show and
> hide them as needed. I can write a script to enable or disable them based
> upon the state of the dgDataOfLine next to the corresponding checkbox.
> Simple, elegant, hackage. :-)
>
> Bob
>
>
> On Dec 14, 2011, at 10:26 AM, zryip theSlug wrote:
>
> > Hi Bob and Pete,
> >
> > As replied by Pete, a simple solution could consist to hide or show
> > the checkbox column.
> >
> > The correct syntax is:
> >
> > set the dgColumnIsVisible["myColumn"] of grp "MyDataGrid" to {true or
> false}
> >
> >
> >
> > Best regards,
> > --
> > -Zryip TheSlug- wish you the best! 8)
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list