EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: roberto on March 22, 2017, 08:54:39 AM



Title: get datagrid from column styler event
Post by: roberto on March 22, 2017, 08:54:39 AM
hi,
how can I get the datagrid from column styler event? Is it possible?
tia.


Title: Re: get datagrid from column styler event
Post by: jarry on March 22, 2017, 11:42:05 PM
Please refer to the code below:
Code:
styler: function(value,row,index){
  var dg = $(this);
  //...
  if (value < 30){
    return 'background-color:#ffee00;color:red;';
  }
}
Make sure to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5.1-patch.zip


Title: Re: get datagrid from column styler event
Post by: roberto on March 23, 2017, 08:02:53 AM
 I may be doing something wrong cause $(this) returs the column options not the datagrid