5 - Sorting In Jquery Datatables With ASP.Net MVC

preview_player
Показать описание
This video demonstrates, how to do sorting in jQuery DataTables with ASP.Net MVC. Whenever sorting is required, consider two important things - one is Column that is to be sorted and Sorting order (Ascending/Descending),
This video also explain how to specify 'Default sort order column

The way to collect 'Sort Parameters' is as follows :
string sortColumn = Request.Form.GetValues("columns[" + Request.Form.GetValues("order[0][column]").FirstOrDefault() + "][name]").FirstOrDefault();

string sortDirection = Request.Form.GetValues("order[0][dir]").FirstOrDefault();

Рекомендации по теме
Комментарии
Автор

Please teach us asp.net core as well 🙏

AmitKumar-dcto
Автор

Thank you for the video, will u make pagination as well?

skalippanbalippan