Page 1 of 1

Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 4:10 pm
by kellymdeters
I created and maintain a application for students designing lab experiments. There is a data table field and in this next version I'd like to make it so that the column widths are adjustable (I can do it so they all change - but I want students to be able to widen one column without having all the rest have to match) and (less important but still a wish) that they can merge cells (like to make a title that spans multiple columns). Basically I want it to work like a table in a Word document - adjustable widths and merging capabilities.

I've never figured out how to do this in 4 versions and really want it for this one...any help is greatly appreciated! :)

Kelly Morgan Dempewolf

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 4:45 pm
by Klaus
Hi Kelly,

use a "datagrid" instead of a "table" field!
The datagrid comes with a built-in "column resizing" feature :D

No idea about "merging cells", sorry.


Best

Klaus

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 4:58 pm
by kellymdeters
Thanks!

Can the "data grid" field (which I've never used before) be easily saved in a MySQL database in a single field? That's what I use for the back-end of my application

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 5:07 pm
by Klaus
Hi Kelly,
kellymdeters wrote:Can the "data grid" field (which I've never used before) be easily saved in a MySQL database in a single field? That's what I use for the back-end of my application
yes, if you have a datagrid of type TABLE, which is what you probably need, then you can save its "dgtext" into one db field,
since "the dgtext of grp XYZ" is "just" CR and TAB delimited text in the end.
...
put the dgtext of grp "name of your datagrid here" into tDGText
## now store tDGText in ONE db field
...

Datagrids are complex bests with lots of features, but of type TABLE quite easy to understand. :D


Best

Klaus

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 5:17 pm
by kellymdeters
Thank you!

Yes, Data Grids appear very scary to me...but with your help I know which direction to head! :)

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 5:29 pm
by Klaus
Count on me!

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 6:22 pm
by bn
Hi Kelly,

maybe the modified Table Field I made is useful to you.

http://www.berndniggemann.on-rev.com/mo ... vecode.zip

It is a field with for tabular data you can adjust the column width manually by dragging the vertical dividers, also adjust column width automatically by control-clicking into the field. Various sorting options by clicking into the header line.
No right alignment for columns, no data entry. Please read the help file in the "?" button.

Kind regards
Bernd

Re: Tables - adjustable columns or merging cells

Posted: Thu Jan 31, 2013 7:10 pm
by kellymdeters
Thank you! I'll check it out!