EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
March 28, 2024, 03:21:48 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
>
How to get column name in formatter?
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to get column name in formatter? (Read 7738 times)
aswzen
Sr. Member
Posts: 287
Indonesian
How to get column name in formatter?
«
on:
March 28, 2017, 11:22:38 PM »
How to get column name in formatter?
Code:
function formatContent(value,row,index){
data = columnName.split('-');
if(data[1] != undefined){
return 'OK';
} else {
return 'NOT OK';
}
}
Thank you in advance
Logged
Regards,
Sigit
- Indonesian jEasyUI Facebook page :
https://www.facebook.com/groups/jeasyuiid/
aswzen
Sr. Member
Posts: 287
Indonesian
Re: How to get column name in formatter?
«
Reply #1 on:
January 18, 2018, 09:53:26 AM »
Hello stworthy,
Is this possible to get colum name while formatting its column?
Thank you
Logged
Regards,
Sigit
- Indonesian jEasyUI Facebook page :
https://www.facebook.com/groups/jeasyuiid/
aswzen
Sr. Member
Posts: 287
Indonesian
Re: How to get column name in formatter?
«
Reply #2 on:
January 18, 2018, 10:44:00 AM »
never mind
Code:
function formatContent(value,row,index){
var col = "";
for(var name in row){
col = "";
var value = row[name];
if(value === val){
col = name;
break;
}
}
return col;
}
Logged
Regards,
Sigit
- Indonesian jEasyUI Facebook page :
https://www.facebook.com/groups/jeasyuiid/
shumakosik
Newbie
Posts: 15
Re: How to get column name in formatter?
«
Reply #3 on:
January 19, 2018, 04:56:26 AM »
It's simple:
You can get field in Formatter:
function formatContent(value,row,index){
return this.field;
}
Logged
aswzen
Sr. Member
Posts: 287
Indonesian
Re: How to get column name in formatter?
«
Reply #4 on:
May 13, 2018, 09:55:33 PM »
should be on documentation
Logged
Regards,
Sigit
- Indonesian jEasyUI Facebook page :
https://www.facebook.com/groups/jeasyuiid/
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...