EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: magicloud on July 21, 2013, 11:39:10 PM



Title: How to apply class to rowStyler?
Post by: magicloud on July 21, 2013, 11:39:10 PM
In datagrid rowStyler, the document says I could return css styles. How could I return class? This is quite useful with global style set.


Title: Re: How to apply class to rowStyler?
Post by: stworthy on July 22, 2013, 02:49:37 AM
Before use this feature under version 1.3.3, please download the updated datagrid plugin from http://www.jeasyui.com/easyui/plugins/jquery.datagrid.js and include it in the page.
Code:
<style>
  .r1{
    background-color:#eee;
  }
</style>
Code:
$('#dg').datagrid({
  rowStyler:function(){
    return {class:'r1'};
  }
});


Title: Re: How to apply class to rowStyler?
Post by: magicloud on July 22, 2013, 07:27:51 PM
Thank you.