当jDataTable加载时缩小 [英] Shrinking of jDataTable when its load
问题描述
我在服务器端绑定GridView然后我使用以下Js函数将其转换为J-Table。
最初J-Table正在缩小大小然后正常加载。这给了应用程序非常丑陋的外观...
我知道它的时间延迟将网格转换为Jquery-Tables的时间延迟。但是如何避免缩小....
我尝试在fnDrawCallback中设置宽度为100%preDrawCallBack和所有..但它没有用..
这是我用来转换为J-DataTable的代码..
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 ..
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]}]
});
}
}
概念是第一个我绑定服务器端的Gridview然后转换它使用上面的Javascript函数进入J-DataTable。
我希望你能理解我的错误问题。但如果你有任何好的答案,请回复我....
谢谢,
Sarath
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
推荐答案
(' #' + ' <%= grvPqaAnalysis.ClientID%>')。dataTable({
bJQueryUI: true ,
bRetrieve: true ,
bFilter: true ,
bSort: true ,
< span class =code-string> bInfo: true ,
aaSorting:[[ 0 , asc]],
bAutoWidth: true ,
' iDisplayLength':pageSize,
bPagination: true ,
sPaginationType: full_numbers,
bPaginate: true ,
bProcessing: true ,
width: 100%,
< span class =code-string> aoColumnDefs:[{bSortable: false ,aTargets:[ 0 ]}]
});
}
}
('#' + '<%=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]}] }); } }
概念是第一个我绑定服务器端的Gridview然后转换它使用上面的Javascript函数进入J-DataTable。
我希望你能理解我的错误问题。但如果你有任何好的答案,请回复我....
谢谢,
Sarath
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
这篇关于当jDataTable加载时缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!