Topic: TableGrid Header Size

Hello again people,
Is it possible to get the Header of a tableGrid to automatically Spread across the width of the table without resizing it manually?
Thank you

Re: TableGrid Header Size

Hi,
Can you give a bit more detail?
Are you meaning the column headers and if so, what exactly do you want to happen? 
For example, if there are 5 columns, do you want them equally sized across the width of the tablegrid?  What if the contents of the column are wider than the header text etc etc?
MVD has options (via script) to dynamically size column widths by column header title, by cell content, by both, or for all columns to be equally sized.  Finally, you can actually hard code the width of one, some or all of the columns individually.
Also, standard MVD (ie, without script) allows for you to manually resize the column widths - this should get carried forward to the next time that you run your program.
Derek.

Re: TableGrid Header Size

derek wrote:

Hi,
Can you give a bit more detail?
Are you meaning the column headers and if so, what exactly do you want to happen? 
For example, if there are 5 columns, do you want them equally sized across the width of the tablegrid?  What if the contents of the column are wider than the header text etc etc?
MVD has options (via script) to dynamically size column widths by column header title, by cell content, by both, or for all columns to be equally sized.  Finally, you can actually hard code the width of one, some or all of the columns individually.
Also, standard MVD (ie, without script) allows for you to manually resize the column widths - this should get carried forward to the next time that you run your program.
Derek.

Yes Derek, I would like it to be equally sized across the width of the tablegrid
Thank you

Re: TableGrid Header Size

Hi,
Have a look at the attached as an example of how you could do it (comments are in the script).
Derek.

Post's attachments

Attachment icon shmutus2.zip 340.17 kb, 226 downloads since 2021-11-21 

Re: TableGrid Header Size

derek wrote:

Hi,
Have a look at the attached as an example of how you could do it (comments are in the script).
Derek.

Thank you derek it's perfect!

Re: TableGrid Header Size

Hello Derek,
In this example, you have created a cfsearch by concatenating all fields and used only 1 search box in Form1 referring to cfsearch. This has greatly simplified the form design and reduced number of Edit fields needed for searching all fields in the table. This is a new learning for me which I hope to use in my projects. Script to automatically resize columns of tablegrid as per the desired result is also  great. There is one GridStyle option called gsSlides. But selecting this option seems to display only one column info. How to best use this option?
Regards,
Eyeman

7 (edited by sparrow 2021-12-21 20:51:41)

Re: TableGrid Header Size

Hi,

eyeman303 wrote:

GridStyle option called gsSlides

Like a simple report or something like a business card or simple medical card.
But all settings are done through a script (Cell can be postitioned at any position in row by hand through a script).

 
You can read here (with an example) - http://myvisualdatabase.com/forum/viewtopic.php?id=3717

Re: TableGrid Header Size

Hi Sparrow,
Thank you for the reference. Making tablegrid in slides look good when lot of text needs to be displayed. However it seems that a lot  of script is needed to display a single tablegrid correctly.
Regards,
Eyeman