Page 1 of 1

Column heading width same size as cell width

Posted: Sat Mar 23, 2013 10:18 am
by Stuart
The column heading widths are a non-bindable property, however, you can bind grid cell width.

Problem is that cell width is driven by column heading widths (i.e., grid cell width can never exceed column heading width, which I understand.)

I am working on a dynamic grid (cell widths are calculated) I cannot, however, make the heading column widths the same size as the cell widths. So, I have made the column heading widths all the same size, which is the maximum width of all the cells. This does not render nicely, as the cell width ends up with unused space.

Column heading------
Cell----unsused space

Re: Column heading width same size as cell width

Posted: Sat Mar 23, 2013 1:30 pm
by Stuart
OK, tried setting column heading widths using setProperty() function on "onload" event as thus,

getObj("Grid4").grid.setProperty("column widths",get("colWidths"));

The result from this sets all column widths to the same width, regardless of the values specified in the comma seperated list

The list below is the contents of the RPG program variable, defioned as char(512) (these match the individual cell widths):
200,178,200,200,200,200,200,200,200,89,89,89,89,89,89,89,89,61,89,200,200,200,200,200,178,60,80,89,89,89,60,60,60,60,60,200,121,89,89,89,71,89,0,0,0,0,0,0,0,0,0,0

Re: Column heading width same size as cell width

Posted: Sat Mar 23, 2013 1:46 pm
by Alex
Whenever you set a property, such as "column widths", you must also call the render() method on the grid. Have you tried this?

See here for an example: http://www.profoundlogic.com/docs/displ ... nder%28%29

Re: Column heading width same size as cell width

Posted: Sat Mar 23, 2013 4:54 pm
by Stuart
I receive the following error when I try to use the render() function:

Onload error: Object doesn't support property or method 'render'

Here is the js in the "onload" event for the record format:

getObj("Grid4").grid.setProperty("column widths",get("colWidths"));getObj("Grid4").grid.render();

Re: Column heading width same size as cell width

Posted: Sat Mar 23, 2013 9:18 pm
by Alex
That method was added in version 4.2.2. Are you using an earlier version of Profound UI?

Re: Column heading width same size as cell width

Posted: Sun Mar 24, 2013 8:35 am
by Stuart
Looks like this version was released on 1/09/2013. How do you check the version that you have installed?

Re: Column heading width same size as cell width

Posted: Sun Mar 24, 2013 10:18 am
by Stuart
We have version 3.3.4 installed Are there any issues/conditions to be aware of when upgrading to version 4?

Re: Column heading width same size as cell width

Posted: Mon Mar 25, 2013 10:18 am
by Scott Klement
You can find a list of the changes made in ProfoundUI releases here:
http://www.profoundlogic.com/versions.rpgsp

It's especially important to look for anything in red in that list, those are critical differences that might affect your conversion from 3.3.4 to 4.x.x. Often these will provide a link to a more detailed description -- make sure you read that, some manual changes might be required.

When making an upgrade across so many different versions, I would strongly recommend setting up a test environment and making sure the new version works for you before putting it into production. That way, if there's a compatibility problem, you can check it out and fix it in a leisurely fashion, rather than freaking out because your system is down :-)

Also, I'd make sure you have a good backup of the system before beginning on the upgrade -- it's just good sense, in case something goes wrong.