EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 06:35:48 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
datagrid styler function and bolding text
Pages: [
1
]
« previous
next »
Print
Author
Topic: datagrid styler function and bolding text (Read 7978 times)
jpierce
Jr. Member
Posts: 73
datagrid styler function and bolding text
«
on:
June 25, 2013, 08:00:14 AM »
I've run into a bit of a problem with styling cells. I can pass in a styler function and conditionally set the style of a cell. The problem is that the datagrid only sets that style on the TD and the DIV that contains the text has some styles set on it that are overriding anything set on the TD.
For example, I wan't to bold certain cells. So I have my styler return font-weight:bold. The cells aren't bolded. Investigating the code shows that the TD has font-weight:bold, but the child DIV has font-weight:normal. The DIV's style override's the TD's style. If I use the dev tools and remove the font-weight:normal style, then the TD's style passes through.
Suggestions on a workaround? (My first thought was !important but of course that doesn't work here.)
Edit: My next thought, which worked, was to add a style in my CSS file for div.datagrid-cell { font-weight:normal }. Are there any downsides to this approach? I guess the next question is why does it bother settings those styles on the DIV instead of the TD.
«
Last Edit: June 25, 2013, 08:02:04 AM by jpierce
»
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: datagrid styler function and bolding text
«
Reply #1 on:
June 25, 2013, 11:21:10 PM »
Please confirm you are using the lastest version 1.3.3. If not, download and use the version 1.3.3 or override the datagrid view as discussed in
http://www.jeasyui.com/forum/index.php?topic=1827.0
Logged
jpierce
Jr. Member
Posts: 73
Re: datagrid styler function and bolding text
«
Reply #2 on:
June 26, 2013, 06:56:09 AM »
Yep, looks like 1.3.3 fixed it. Thanks!
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...