EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
June 25, 2024, 11:27:14 PM
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 image on cell
Pages: [
1
]
« previous
next »
Print
Author
Topic: datagrid image on cell (Read 6931 times)
crosemffet
Jr. Member
Posts: 68
datagrid image on cell
«
on:
November 26, 2015, 04:13:28 PM »
hello and thanks in advance for your support,
I have one datagrid, with url loading method.
the columg gets its data from the server:
<th data-options="field:'myDataBaseField',width:20,styler:cellStyler">xxx</th>
everything works ok. I have also the cellStyler function to change background color of the cell if value meets specific requirements:function cellStyler(value,row,index){
if (value == 0){
return 'background-color:#ffee00;color:red;';
}
}
the problem is I want to put one image on the cell, not change the background color.
any idea will be very appreciated, I'm stuck on it,
Logged
stworthy
Administrator
Hero Member
Posts: 3581
Re: datagrid image on cell
«
Reply #1 on:
November 26, 2015, 11:32:33 PM »
Please try to use the 'formatter' function instead.
Code:
formatter: function(value, row){
if (value == 0){
return '<img src.../';
}
}
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...