<asp:GridView ID="grdDonationRequests" runat="server" SelectMethod="grdDonationRequests_GetData" AutoGenerateColumns="False"
AllowPaging="True" PagerSettings-Mode="NumericFirstLast" PageSize="10" DataKeyNames="DonationRequestID" ItemType="Tayf.Models.DonationRequest"
AllowSorting="true" Width="100%" CssClass=" table-striped table-condensed table table-bordered table-hover" meta:resourcekey="grdDonationRequestsResource1">
我試圖做到這一點如何在asp.net GridView上應用Datatable jQuery?
$(function() {
$("#<%=grdDonationRequests.ClientID%>").prepend(
$("thead>/thead>").append($(this).find("tr:first"))).dataTable({
});
});
,但它給了我一個錯誤 Uncaught TypeError: Cannot read property 'className' of undefined
Update:-
當我嘗試這樣做'$("#<%=grdDonationRequests.ClientID%>").dataTable({ "aaSorting": [] });'
它給我任何錯誤也畫GridView控件的數據表,但它顯示作爲空的
不清楚你在問什麼。你能詳細解釋一下嗎? –
@PiyushKhatri我需要在我的asp.net gridview上應用數據表jquery插件,它使我能夠搜索,排序,分頁......等 –