Frozen column row heights

QuestionsFrozen column row heights
Matthew asked 8 years ago

Hi, I've got an issue with frozen column heights. I am freezing the first 2 columns of my grid which work fine however in my grid I also use conditional css to colour some cells and wrap them onto two lines. This results in the rows being double height. When the frozen columns are rendered on top of this grid they are still only single height and hence don't line up with the rows. Any ideas how to get around this?

Here's a snip of my code showing the css wordwrapping:

$col = array();
$col["title"] = "Id";
$col["name"] = "id";
$col["width"] = "20";
$col["hidden"] = true;
$col["frozen"] = true;
$cols[] = $col;

$col = array();
$col["title"] = "AR";
$col["name"] = "AR;
$col["width"] = "75";
$col["fixed"] = true;
$col["editable"] = true;
$col["align"] = "center";
$f = array();
$f["column"] = "AR";
$f["op"] = "cn";
$f["value"] = 'Lv1';
$f["cellcss"] = "'background-color':'#e4d354','white-space':'normal'";
$f_conditions[] = $f;
$cols[] = $col;

Thanks,

Matt

3 Answers
Matthew answered 8 years ago

$col["name"] = "AR"; missed a " when sanitising the code

Matthew answered 8 years ago

ok I thought about it some more and came up with the following workaround. I created a virtual column and put this as the first column in the grid. It displays a skinny blank column which doesn't look the best but at least the row heights line up:

$col = array();
$col["title"] = "spacer";
$col["name"] = "spacer";
$col["width"] = "1";
$col["fixed"] = true;
$col["editable"] = false;
$col["frozen"] = true;
$col["default"] = "<br><br>";
$cols[] = $col;

Abu Ghufran answered 8 years ago

Thanks for sharing. I've update some frozen column code that manages double lines better using extra JS code.
http://www.phpgrid.org/demo/demos/appearance/frozen-columns.phps

Your Answer

4 + 13 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?