Page 1 of 1

Adding CSS styles by RowAttrs

Posted: Sat Jul 06, 2024 5:49 am
by sticcino

this:
$this->RowAttrs["style"] = "background-color: #8fbc8f";
or
$this->RowAttrs["style"] = "color: red";

doesn't appear to be working?


Re: RowAttrs now working?

Posted: Sat Jul 06, 2024 9:05 am
by arbei

Note that your styles may not override the default styles, you may Inspect HTML element and test your own CSS styles first. You may need to add !important.


Re: Adding CSS styles by RowAttrs

Posted: Thu Jul 11, 2024 1:49 am
by DGarza

sticcino wrote:

$this->RowAttrs["style"] = "background-color: #8fbc8f";
or $this->RowAttrs["style"] = "color: red";
doesn't appear to be working?

You can try with this:

$this->YourColumnName->CellAttrs["style"] = "background-color: #8fbc8f";

Or this:

$this->RowAttrs->appendClass("cssclassname");