CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Add/Remove columns with checkboxes

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 01/07/2010, 10:55 PM

I am sure someone must have done this is the past. Anyway, I am hoping so.

I have a table with fields f1, f2, f3, f4

I want to have a row of checkboxes corresponding to these fields i.e. f1, f2, f3, f4

Now the tricky part .. I would like to have the user select which columns to show in a grid by clicking the checkboxes on or off. e.g. he checks f1 and f3 and those two columns appear. He unchecks f3 and only the f1 column shows.

Any ideas please!!
View profile  Send private message
damian

Posts: 838
Posted: 01/08/2010, 3:06 AM

could you perhaps post a graphic/image showing what you are after?
_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message
saseow

Posts: 744
Posted: 01/08/2010, 4:59 AM

Hi Damain,

I have no idea how to attach an image on this forum although I do have one.

It is simply a grid that will show whatever columns that the user has selected to show by clicking check boxes. Each column from the table has a corresponding check box so in my example we would have 4 checkboxes above the grid that would say f1, f2, f3 and f4. Let's say the default columns that will be shown as the page opens are f1 and f3. The check boxes f1 and f3 will automatically be checked. If he now wants to show the column f4 as well, he can simply click the f4 checkbox and viola! ... the f4 column can be seen.

I was thinking on the lines of a grid whose ds includes all the columns from the table but some of them are hidden ... in this case f2 and f4. Then, using javascript show or hide the columns depending on the state of the check boxes as the user checks them on or off.

Does this make sense? I know it can be done as I have a working copy. Just not sure how to go about it in CCS.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.