Sathish David Kumar N
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' } );
}
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 ?
ASKER
Actually I am using data table .
My Html table should be
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>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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>
>>>>>>>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 ??
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>
>>>>>>>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 ??
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