Multiple Column Sorting With dgrid

How can I change the default behavior of grid.js::_setSort() in order to correctly display the sort criteria (up/down arrow) in the header of all the columns involved in a sort? Currently, _setSort() only deals with the first column of the array passed to grid.set("sort"). For example, after setting the sort criteria with the following command, only the header of col1 will contain an arrow (up arrow in this case).

grid.set("sort", [{attribute: col1, descending: false}, {attribute: col2, descending: true}]);

I could override _setSort() but the underscore tells me it's a private function...

Answers


The underscore just means that the function should be treated as private, but that doesn't mean you can't override it. I would go forth and prosper with your override approach. :)


Need Your Help

iOS: Is it possible to take screenshots while running as a background task?

ios ios4 screenshot

I want to take screenshots of any running app, while my app is in the background.

C# foreach with index

c# foreach

Is there a C# equivalent of Python's enumerate() and Ruby's each_with_index?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.