RelatedUserInfo.js - Forcing a sort by LastModified date
Hope someone knows how to do the following.
Using the Search User to find a user then loading the user details, I click on the Requests the user has against their name. The returned values are in any order. I would like to modify the relateduserinfo.js to sort by lastmodified column automatically when selecting the Requests column. Has anyone done this before.
I can see the code in the the js below but not sure how to set up the automatic sort.
Kind regards
Eugene
Best Answer
-
seth_coussens Member Ninja IT Monkey ✭✭✭✭Hey Eugene, there isn't a great way to do this using the form customizations, but you could do this using javascript in the custom.js and waiting for the page to load.
You can make after the fact modifications to the kendo grid that is being used as the object picker after it loads and change the sort order.
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid
There is a link to the kendo API reference, that should give you some ideas on how you can accomplish this. You should also be able to find examples here in the community on how you can have your customizations run after the page is fully loaded as well.
My personal recommendation is to use a mutation observer.5
Answers
You can make after the fact modifications to the kendo grid that is being used as the object picker after it loads and change the sort order.
http://docs.telerik.com/kendo-ui/api/javascript/ui/grid
There is a link to the kendo API reference, that should give you some ideas on how you can accomplish this. You should also be able to find examples here in the community on how you can have your customizations run after the page is fully loaded as well.
My personal recommendation is to use a mutation observer.