EasyUI Forum
September 14, 2025, 08:13:00 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: How to apply class to rowStyler?  (Read 9755 times)
magicloud
Newbie
*
Posts: 9


View Profile
« 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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'};
  }
});
Logged
magicloud
Newbie
*
Posts: 9


View Profile
« Reply #2 on: July 22, 2013, 07:27:51 PM »

Thank you.
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!