Checkboxes in Tables ?

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Checkboxes in Tables ?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:11 pm

by Silver Springs... >> Mon, 23 Nov 1998 20:27:14 GMT

Hi JADErs,
I have got sucked into using tables a lot through making use of the table generation features of the 'enhanced' Form Wizard. This provides a lot of the code needed to get up and running with quite comprehensive table facilities (such a pity this isn't all wrapped up into the Table control by default).

I have a problem however with checkboxes presented on tables. The table row is initialised in a method with code like this :

// --- User is a Manager?
tbl_User.column := 9;
tbl_User.inputType := 1;

In the method that reads the class instances a checkbox on a table cell is filled and formatted like this :

tbl_User.column := 9;
tbl_User.text := inst.userIsMgr.Integer.String;

And in the method that saves the instance the table cell is converted like this :

tbl_User.column := 9;
inst.userIsMgr := tbl_User.text.Integer.Boolean;

Most unfortunate that this type conversion seems to be necessary in order to make use of checkboxes but never mind.

Code like this is similar for Integer attributes whereas String ones don't require type conversion.

The code to save an instance is triggered by the tblChangeRow event on the table -- and this all seems to work fine for all attribute types except multiple checkboxes.

If I have one checkbox in my table (along with Integer and String columns) then this works as expected but as soon as I expand the methods to display for update say, 4 checkbox columns -- then upon execution the checkboxes get filled with X's or unchecked seemingly automatically when I click on one ie. others seem to be affected when I click on just one checkbox.

Am I :
-- dreaming and in desperate need of a Guarana Blast fix ?
-- experiencing a JADE bug ?
-- coding wrong and need to re-test by going back to square #1 ?
-- in need of a specific tip for dealing with checkboxes in tables in a reliable, robust and efficient manner?

Cheers
Alan J.Thomson
voice ... 09-366-1463 or mobility-wise 025-292-0111 ................................
e-Mail: athomson@cardinal.co.nz
Jade: http://www.discoverJade.com
Wonderland: http://home.clear.net.nz/pages/athomson
______/7__/7__/7__/7______
\::*::::*::::::A l a n:::::::: ::::::::: ::/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Je ne regrette rien (dans la coeur de la froid, froid city) ... ... ....."

Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 1 guest