Link to home
Start Free TrialLog in
Avatar of Sathish David  Kumar N
Sathish David Kumar NFlag for India

asked on

How to remove fixed column horizontal scroll bar

var rowCount = $('#fixedTable tr').length;
   var heightDy=$('#fixedTable ').height()-300;
   if(rowCount>1){
    var cTable =$('#fixedTable ').dataTable( {
        "scrollY"        : "94%",     
        "scrollX"        : "90%",
        "scrollCollapse" : true,
        "bFilter"        : false, 
        "bInfo"          : false,
        "bJQueryUI"      : false,
        "bAutoWidth"     : false,
        "paging"         : false
        
    } );
    
     new $.fn.dataTable.FixedColumns( cTable, { heightMatch: 'none' }  );
    
   
  }   

Open in new window


while my table display is giving 2 scroll bar . 1)How to remove fixed column horizontal scroll bar

2)both the scroll bar not in alignment ? how to do the alignment ?
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Hi,
could you perhaps share a little bit more of your HTML/CSS/Javascript source?
How does the table look alike (column wise, content wise)?
Thanks.
Rainer
Avatar of Sathish David  Kumar N

ASKER

Actually I am using data table .

My Html  table should be

<div name='fixedDiv' id='fixedDiv' > 
   <table name='fixedTableId' id='fixedTableId'  border=1  width='100%'  bgColor='#C0C0C0'> 
       <thead>
              <tr>1</tr>
                 <tr>2</tr>
                 <tr>3</tr>
                   <tr>4</tr>
  </thead>
   <tbody>
         <tr> <td> aa </td></tr>
            <tr> <td> bb</td></tr>
           <tr> <td> cc</td></tr>
           <tr> <td> dd</td></tr>
</tbody>
</table>
</div>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
HI Rainer ,

Thanks,

>>>>>okay - first of all the thead area is invalid - should more look like this:
Actually its sample data only . I missed <th> its there in my original

>>>>>Second - do you really want to have four header rows?
only one row other are <th>

<thead>
	<tr>
        <th>1</th>
	<th>2</th>
	<th>3</th>
	<th>4</th>
      </tr>
</thead>

Open in new window



>>>>>>>hird - your script references the wrong table id - should be '#fixedTableId' instead of '#fixedTable'.
How can you say ?
in my HTML table id is #fixedTableId  i didnt use #fixedTable any where ??