我试图将jquery数据绑定到gridview.它抛出异常.
"该表必须按标题,正文和页脚的顺序包含行部分."
<script type="text/javascript" charset="utf-8">
/* Define two custom functions (asc and desc) for string sorting */
$(document).ready(function () {
/* Build the DataTable with third column using our custom sort functions */
$('#gvInitiavtives').dataTable({
"aaSorting": [[0, 'asc']
});
});
Run Code Online (Sandbox Code Playgroud)
<asp:GridView ID="gvInitiavtives" runat="server" Width="100%" CssClass="Grid"
RowStyle-Width="30px" AutoGenerateColumns="false" HeaderStyle-CssClass="GridHeader" RowStyle-CssClass="GridItem" AlternatingRowStyle-CssClass="GridAltItem" DataKeyNames="InitiativeIdx" AllowSorting="true" ClientIDMode="Static" >
<EmptyDataRowStyle BorderStyle="None" BorderWidth="0px" />
<EmptyDataTemplate>
<asp:Label ID="lblNorecId" runat="server" Text="Sorry! Your requested records are not found, please try with other search criteria." Font-Bold="true" ForeColor="red" Font-Names="Arial" …Run Code Online (Sandbox Code Playgroud)