EasyUI Forum
March 28, 2024, 01:40:32 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to formatter datagrid column when columns & rows from json file  (Read 4924 times)
Aod47
Jr. Member
**
Posts: 81


View Profile
« on: February 21, 2018, 07:55:15 PM »

My datagrid column and rows from json file. (json file generate from asp.net .ashx page)
It work perfectly but when I add formatter option to column, chrome thrown error 'col.formatter is not a function'

Code:
"columns":[[
{"field":"ck","title":"Case","align":"center","checkbox":true},
{"field":"barcode","title":"Barcode","align":"left"},
{"field":"sn","title":"Serial No","align":"left"},
{"field":"regNumber","title":"Register No","align":"left"},
{"field":"last_time","title":"Last Time","align":"left"},
{"field":"cmd","title":"CMD","align":"center","formatter":"formatCmd"}
]]

I changed to  {...,"formatter":"formatCmd()"} and {...,"formatter":formatCmd} but had the same error result.

Could you please advice. Thank you
Logged
Aod47
Jr. Member
**
Posts: 81


View Profile
« Reply #1 on: February 21, 2018, 10:57:50 PM »

OK. I found the answer at topic.

https://www.jeasyui.com/forum/index.php?topic=5480.0
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!