Open pv619 opened 10 years ago
anyone please????
Hi,
The sorting is performed on the server not in the browser. So your server code needs to respond to the jtSorting parameter.
Good Luck
Hi Misterparsons,
Thanks for your suggestion.. I have tried passing the jtSorting parameter but it keeps on failing. Is it possible for you to show how to pass the jtSorting parameter on this line of the code?
var newlist = daa.OrderByDescending(i => i.Times).ToList().GetRange(jtStartIndex, jtPageSize).Sort(jtSorting);
I have been stuck with it from a week now, have tried mostly everything.
Hope that you help out and thanks in advance :)
Hi,
If sorting is turned on, jtable posts it to the server with each listAction request. You do not need to do anything in the browser, same is true for jtStartIndex and jtPageSize. What browser and server are you using? Your server code needs to respond to the parameter and do the necessary sorting.
Also looking at your code the default sorting should match the field name not the title of the field. i.e TrackName.
@pv619 I will help you achieving this with PHP:
@georgetrad Thank you for the solution. This has totally helped me on fixing the sorting issue.
Hi.. I am trying to sort my columns but it ain't doing it for some reason. Am I missing something here?
My Controller code:
jtable View Code:
On the client side I have enabled sorting but still it ain't doing it.
Please help me out, I am new to jTable implementing with C# ASP.NET MVC 4.. Any help is highly appreciated :)