3.2.0
Default Order:
.Orders(order => {
order.Add(p => p.Name, OrderBy.Descending);
order.Add(p => p.Age, OrderBy.Ascending);
})
Using this method you can define which column(s) the order is performed upon, and the ordering direction. Reference
Using Tag Helper:
<orders>
<add field="Name" order-by="Descending" />
</orders>
Length Menu:
.LengthMenu(new int[] {5,10,15})
This method allows you to readily specify the entries in the length drop down select list that DataTables shows . Reference
.LengthMenu(new int[] {5,10,15}, true)
Set hasAll paramter true to show All option in select.
.LengthMenu(new int[] {5,10,15}, true, "All Pages")
Set allText paramter to change name of option All.
Using Tag Helper:
<length-menu values="new int[]{5,10,15}" has-all="true" all-text="All Pages"/>
Page Length:
.PageLength(15)
Number of rows to display on a single page when using pagination. Reference
Using Tag Helper:
<data-source page-length="20"/>