Author Topic: How do I use format without ParamQuery Pro  (Read 2287 times)

miside

  • Newbie
  • *
  • Posts: 4
    • View Profile
How do I use format without ParamQuery Pro
« on: May 20, 2019, 07:10:38 pm »
I want use format, like formatter in easyui grid:
$('#dg').datagrid({
   columns:[[
      {field:'userId',title:'User', width:80,
         formatter: function(value,row,index){
            if (row.user){
               return row.user.name;
            } else {
               return value;
            }
         }
      }
   ]]
});
can you give me some advice to achieve this?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How do I use format without ParamQuery Pro
« Reply #1 on: May 22, 2019, 06:47:20 pm »
you could use column.render callback.