Created
February 18, 2015 21:34
-
-
Save PilotBob/fbfb0157c01218a60292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GetGridState = function(dataSource, grid$) { | |
var state = { | |
page: dataSource.page(), | |
pageSize: dataSource.pageSize(), | |
sort: dataSource.sort(), | |
group: dataSource.group(), | |
filter: dataSource.filter(), | |
scroll: $(".k-grid-content", grid$).scrollTop(), | |
aggregate: dataSource.aggregate() | |
}; | |
if (state.pageSize === undefined) { | |
delete state.page; | |
delete state.pageSize; | |
} | |
return state; | |
} | |
Is there a better way to just not create the pagePagesize properties orignally without checking later? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment