Is there a way to specify the default sorting direction for columns in the Teerrak MVC grid?
Example: Click on the column 'Date' and it is descending, click on the column 'name' and this ascending
I do not think there is no way in today's grid to change the" cycle "order for the operation to be trimmed. By default, the grid will cycle through these types of orders when the header is clicked:
Unsorted> Ascending> Descending
If you use the API option described by Dick , You can set initial sort behavior, but once the column is clicked, it will resume the cycle. Therefore, if you have initially fixed the date of the climb, the next click will be sorted by landing.
This is a relatively common practice for web grids, so this user satisfies the expectations.
If you want to have clear control over sorting behavior, there is a rich customer-side API that allows you to specify sort and filter directly:
Var grid = $ ('# yourGridId'). Data ('tgrid'); // Name Properties Grid Sort records by Filter ('name-desc'); As you can see, you can specify property names and sort directions. You can sort on many fields. For more examples.
Comments
Post a Comment