fsouza
asked on
Modify border only col with jqgrid
I hve a grid with jqGrid, but i need change to large the border of 2 columns only (have 10 columns).
I try this using classes atribute on cellModel, but not works.
How can i change border only specified columns?
Thanks
Felipe
I try this using classes atribute on cellModel, but not works.
How can i change border only specified columns?
Thanks
Felipe
ASKER
Not works fine. i'm trying add "important!" but no have effect
Post a link to the page so we can do diagnostics.
Cd&
Cd&
Inside the ui.grid.css you have this class that should look something like this:
Make sure that your customization css file is defined after the jqgrid css file.
Then, on your css file add this:
If this doesn't work is because we're not working on the same jqGrid version and the DOM might be slightly different.
Tell me which jqGrid version you're using but better yet would be to at least post here the whole <table> element that jqGrid is generating for you.
.ui-jqgrid tr.ui-row-ltr td {
border-right-color: inherit;
border-right-style: solid;
border-right-width: 1px;
}
This depends on the style you chose and defines the default style for all rows.Make sure that your customization css file is defined after the jqgrid css file.
Then, on your css file add this:
td[aria-describedby="list_amount"] {
border-left: 3px solid #f00 !important;
border-right: 3px solid #f00 !important;
}
The !important shouldn't be necessary if your css comes after jqgrid css like I said before. And keep in mind that not all browsers support !important.If this doesn't work is because we're not working on the same jqGrid version and the DOM might be slightly different.
Tell me which jqGrid version you're using but better yet would be to at least post here the whole <table> element that jqGrid is generating for you.
ASKER
The version is 1.10.3 - i'm studing cellattr, this works fine?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry,
jqGrid 4.5.2 - jQuery Grid
jqGrid 4.5.2 - jQuery Grid
Ok.
Have you tried my previous suggestion?
https://www.experts-exchange.com/questions/28280997/Modify-border-only-col-with-jqgrid.html?anchorAnswerId=39613452#a39613452
Make sure your css comes after jqGrid css and that you specify the correct selector:
td[aria-describedby="list_ amount"] is for a column named amount
the column name needs to be prefixed with list_
Have you tried my previous suggestion?
https://www.experts-exchange.com/questions/28280997/Modify-border-only-col-with-jqgrid.html?anchorAnswerId=39613452#a39613452
Make sure your css comes after jqGrid css and that you specify the correct selector:
td[aria-describedby="list_
the column name needs to be prefixed with list_
ASKER
Yes, i tried your suggestion but not give a success. The cellattr is works fine.
Thank you.
Thank you.
Say you want to do that on a jqGrid with id="myGrid" has a column which name is "amount"
create a css class like:
Open in new window