Wednesday, June 13, 2012

Table header is not fixed with Jquery fixheadertable plugin

If you load the table result into a div like the following, where you try to fix the height with css with overflow, the header will not be fixed after scrolling

     <div id="divA21InvResult" style="height:300px;overflow:auto"></div>  



Instead you should add the option "height" when you call the fixheadertable function and pair with a simple div without any height declaration in css

       <div id="divA21InvResult"></div>  

        $('#tblA21InvPrint').fixheadertable({
                    caption     : '',
                    height      : '300',                   
                    colratio    : [30, 50, 100, 100, 50, 515, 80, 400, 400],                  
                    sortable    : true,
                    sortedColId : 1,
                    dateFormat  : 'd-M-Y',
                    resizeCol   : true, 
                    sortType    : ['string1','integer', 'date', 'string', 'string', 'string', 'float', 'string', 'string'],
                    textAlign   : ['center','right','center','center','center','left','right','left','left']
                });


No comments:

Post a Comment