var value = obj.getSortDirection(); obj.setSortDirection(value); obj.onSortDirectionChanging = function(value){...}; obj.onSortDirectionChanged = function(value){...}; obj.onSortDirectionError = function(value){...};