EasyUI Forum
May 04, 2024, 06:00:14 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: add icon column in a Combogrid  (Read 6389 times)
skogkatt
Newbie
*
Posts: 3


View Profile Email
« on: December 26, 2014, 02:01:06 AM »

is it possible to add a random column and put an icon or a linkbutton ?  Huh
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: December 26, 2014, 06:47:05 AM »

You may need to describe your question in more details. If you want to format a specified column, please use the 'formatter' function to custom its appearance.
Logged
skogkatt
Newbie
*
Posts: 3


View Profile Email
« Reply #2 on: December 29, 2014, 01:02:48 PM »

Thank's stworthy for the reply  Cheesy

Basically this is my code :

   <select class="easyui-combogrid" style="width:300px" data-options="
         panelWidth: 300,
         multiple: false,
         idField: 'Nom',
         textField: 'Libelle',
         url: 'datagrid_data1.json',
         method: 'get',
         columns: [[
            {field:'id',title:'ID',width:100},
            {field:'Nom',title:'Name',width:340},
         ]],
         fitColumns: true
      ">
   </select>

so i want to add a column in the combogrid witch i can put an icon in each record in my list to show the status of this record for example.

Another question : How can i use the formatter ?

Thank's
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: December 29, 2014, 06:21:59 PM »

Please try this:
Code:
columns: [[
{field:'id',title:'ID',width:100},
{field:'Nom',title:'Name',width:340},
{field:'status',title:'Status',width:80,
formatter:function(value,row){
return '<img src="..."/>';
}
}
]],
Logged
skogkatt
Newbie
*
Posts: 3


View Profile Email
« Reply #4 on: December 30, 2014, 02:15:20 AM »

No, it's not working  Embarrassed
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!