EasyUI Forum
September 14, 2025, 04:11:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: change cell style on Click Cell  (Read 11712 times)
iskandarkbr
Newbie
*
Posts: 36


View Profile Email
« on: March 24, 2015, 09:01:54 PM »

can we change cell style after we clicked it?
Logged
Opan Mustopah
Full Member
***
Posts: 164


Indonesia


View Profile Email
« Reply #1 on: March 25, 2015, 06:06:46 AM »

did you already try onClickCell event to manipulation datagrid cell style??
Logged

-- Bajak Otak --
*** Sorry for my bad english :3 ***
--JeasyUI version 1.4--
iskandarkbr
Newbie
*
Posts: 36


View Profile Email
« Reply #2 on: March 25, 2015, 07:42:37 PM »

i have this :

var dg=$(this);
var dc = $(this).data('datagrid').dc;
var body = dc.body1.add(dc.body2);
         
body.unbind('click').bind('click',function(e){
   var tr = $(e.target).closest('tr.datagrid-row');
   var tt=$(e.target);
   var index = parseInt(tr.attr('datagrid-row-index'));
   var td=tt.closest("td[field]",tr);
   var field=td.attr("field");
        .........................
        .........................
})

i tried to insert addClass for td in it, but it doesnt restyle
Logged
chrwei
Full Member
***
Posts: 219


View Profile Email
« Reply #3 on: March 26, 2015, 11:19:28 AM »

there is a div inside the td, apply the style to that
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!