Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am binding the GridView in Server side then I am converting that as a J-Table using the following Js function.

Initially J-Table is shrinking in size then it load normally. This gives very ugly look in t application...

I know its happening cos of the time delay where to convert grid into Jquery-Tables . But how to avoid that shrinking....

I tried Setting width as 100% in fnDrawCallback preDrawCallBack and all.. But its not worked..

This is the code I used to convert as J-DataTable ..

JavaScript
function displayPqaAnalysis() {     
    var grvPqaAnalysisTable = document.getElementById("<%=grvPqaAnalysis.ClientID%>");
    if (grvPqaAnalysisTable != null) {
        var oTable = $('#' + '<%=grvPqaAnalysis.ClientID%>').dataTable({
            "bJQueryUI": true,
            "bRetrieve": true,
            "bFilter": true,
            "bSort": true,
            "bInfo": true,
            "aaSorting": [[0, "asc"]],
            "bAutoWidth": true,
            'iDisplayLength': pageSize,
            "bPagination": true,
            "sPaginationType": "full_numbers",
            "bPaginate": true,
            "bProcessing": true,
            "width": "100%",                    
            "aoColumnDefs": [{ bSortable: false, aTargets: [0]}]   
        });
    }
}


The Concept is First I bind t Gridview in server side then converting it into J-DataTable using t above Javascript function.

I hope U can understand My Bad question. But if u have any good answers please respond me back....

Thanks,
Sarath
Posted
Updated 8-Oct-14 20:05pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900