EasyUI Forum
May 14, 2024, 05:49:28 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: Header Background Color of Datagrid  (Read 7849 times)
anugrast
Jr. Member
**
Posts: 52


View Profile Email
« on: August 18, 2016, 09:27:50 PM »

Hi All....

I want to give a different color of my header datagrid with colspan. How to do that??
This is my header
<table class="easyui-datagrid" title="Basic DataGrid" fit="true">
   <thead>
      <tr>
         <th colspan="5">Designer</th>         
         <th colspan="3">Controller</th>                           
      </tr>
       </thead>
   
</table>

Please help me...
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 19, 2016, 01:32:11 AM »

Get the specified column and then call 'css' method to change its background color after creating the datagrid.
Code:
<th id="c1" colspan="5">Designer</th>
<script>
$(function(){
  $('#c1').css('background','#ccc');
});
</script>
Logged
anugrast
Jr. Member
**
Posts: 52


View Profile Email
« Reply #2 on: August 19, 2016, 02:27:02 AM »

stworthy... You're my hero...
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!