CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge -> Programming

 Adding/Displaying custom columns

Print topic Send  topic

Author Message
doeki

Posts: 5
Posted: 02/06/2006, 5:19 PM

Hi,

Trying to coming up with ways to allow the application end user to add additional columns to a table, and then for the display page to list all columns including any newly added ones in a grid. Doing this programmatically outside of CodeCharge would not be a problem, but would welcome any tips or ideas on a specific CodeCharge way of doing this..

Many thanks!

View profile  Send private message
mrachow


Posts: 509
Posted: 02/06/2006, 11:01 PM

What I do.
Placing a label Caption beside the actual caption (Sorter control for example) of a table column.
Placing a label Data beside the control in the table cell below the corresponding column caption.

Lets assume the form containing the table is named Plan.
In Before Show Event of label caption
Plan.Caption.Value = "</TD><TD>Additional Column"
and in Before Show Event of label data
Plan.Data.Value = "</TD>Additional Data<TD>"
Of course the retrieval of the extra data could be more complex as simply putting a string there.
Actual language is ASP.

_________________
Best regards,
Michael
View profile  Send private message
doeki

Posts: 5
Posted: 02/07/2006, 3:22 AM

Hi,

Thanks for the reply!

Maybe I wasn't clear on what I want to do - I want to create dynamic bound datagrids and template columns. The end user will be able to add columns to a table, therefore I won't know how many columns or of what type a SELECT * FROM X query will return.

I'd like to know if there's a given CodeCharge way of doing this, rather than write custom code.

Thanks again,
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 02/07/2006, 9:45 PM

doeki
I can definitely say with my CCS experience that what you are requesting is something that you are going to definitely have to custom program.
View profile  Send private message
doeki

Posts: 5
Posted: 02/08/2006, 12:45 AM

Mambo, seems you are right!

So what I'm left with is something like

Select * from table into an array, then use array as grid.

Not sure about paging/sorting..
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 02/08/2006, 8:40 PM

doeki
Yes, you seem to heading in the right direction. Here are some links to help you out:

Here are some examples of how to create dynamic HTML:
http://docs.codecharge.com/studio3/html/ProgrammingTech...t/Overview.html

This is the basis of the technique that you will need to use to accomplish your goal:
http://docs.codecharge.com/studio3/html/ProgrammingTech...CustomHTML.html

Hopefully this will be helpful.....

I used this technique to create a calendar in CCS 2.3:
http://mambobrown.com/calendar/maincalendar.php
I even wrote an article about it as well (November 2004 issue):
http://www.dataobjx.net/products_home.asp
View profile  Send private message
doeki

Posts: 5
Posted: 02/09/2006, 1:32 AM

Mambo,

Excellent, thanks very much!
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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