PDA

View Full Version : Sizing TreeGrid Columns in CSS



Pandaman
4 Aug 2009, 3:08 PM
I am trying to size the width of a TreeGrid's first column with percent values in CSS. In my case, this is the tree grid cell (the cell the user selects to see children). I am running into issues with sizing the column's header and cells in sync; the width sizes differently using the same percents.

The ColumnConfig object for this column is just instantiated with a default constructor, then the id is set to some id and the header name is set to empty string. Here is my CSS code that I am attempting to use to do this:


/* for the column's header */
.x-grid3-hd:first-child {
width: 25% !important;
}

/* for the column's cells */
.x-grid3-col:first-child {
width: 25% !important;
}

What am I doing wrong? Do I need some additional CSS code to achieve my goal?

Thanks for the help.

Pandaman
5 Aug 2009, 9:43 AM
The CSS is a bit incomplete because I didn't have enough time to post a version of my work simplified for this issue. Do you need more information?

Pandaman
5 Aug 2009, 1:35 PM
Ok sorry, I realized I wasn't sizing all of my columns using percents, which seems to be necessary. I told the parent to size to 100% and one child (column) to 25% and assumed that the rest of the columns would be equally sized according to the remaining space (75%). But this assumption did not pan out.