EasyUI Forum

General Category => General Discussion => Topic started by: anugrast on August 18, 2016, 09:27:50 PM



Title: Header Background Color of Datagrid
Post by: anugrast 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...


Title: Re: Header Background Color of Datagrid
Post by: stworthy 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>


Title: Re: Header Background Color of Datagrid
Post by: anugrast on August 19, 2016, 02:27:02 AM
stworthy... You're my hero...