{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/ui-grid/issues/3219","labels_url":"https://api.github.com/repos/angular-ui/ui-grid/issues/3219/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/ui-grid/issues/3219/comments","events_url":"https://api.github.com/repos/angular-ui/ui-grid/issues/3219/events","html_url":"https://github.com/angular-ui/ui-grid/issues/3219","id":66611791,"number":3219,"title":"How do I get access to entire row.entity object inside colDef.sortingAlgorithm?","user":{"login":"cleon26","id":7850944,"avatar_url":"https://avatars.githubusercontent.com/u/7850944?v=3","gravatar_id":"","url":"https://api.github.com/users/cleon26","html_url":"https://github.com/cleon26","followers_url":"https://api.github.com/users/cleon26/followers","following_url":"https://api.github.com/users/cleon26/following{/other_user}","gists_url":"https://api.github.com/users/cleon26/gists{/gist_id}","starred_url":"https://api.github.com/users/cleon26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleon26/subscriptions","organizations_url":"https://api.github.com/users/cleon26/orgs","repos_url":"https://api.github.com/users/cleon26/repos","events_url":"https://api.github.com/users/cleon26/events{/privacy}","received_events_url":"https://api.github.com/users/cleon26/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/ui-grid/labels/type:%20enhancement","name":"type: enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular-ui/ui-grid/milestones/16","html_url":"https://github.com/angular-ui/ui-grid/milestones/3.1","labels_url":"https://api.github.com/repos/angular-ui/ui-grid/milestones/16/labels","id":1043133,"number":16,"title":"3.1","description":"The first release after a 3.0 completion.  This contains all reasonably immediate issues that aren't considered blockers for a 3.0 release, not all of these would get included in 3.1 but they are the starting list of things for inclusion once 3.1 work commences.","creator":{"login":"PaulL1","id":5248789,"avatar_url":"https://avatars.githubusercontent.com/u/5248789?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulL1","html_url":"https://github.com/PaulL1","followers_url":"https://api.github.com/users/PaulL1/followers","following_url":"https://api.github.com/users/PaulL1/following{/other_user}","gists_url":"https://api.github.com/users/PaulL1/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulL1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulL1/subscriptions","organizations_url":"https://api.github.com/users/PaulL1/orgs","repos_url":"https://api.github.com/users/PaulL1/repos","events_url":"https://api.github.com/users/PaulL1/events{/privacy}","received_events_url":"https://api.github.com/users/PaulL1/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":56,"state":"open","created_at":"2015-03-28T20:45:51Z","updated_at":"2015-11-18T06:55:31Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-04-06T13:59:58Z","updated_at":"2015-11-18T06:55:31Z","closed_at":"2015-11-18T06:55:31Z","body":"I've been looking into sorting a little bit and have come up with a few questions.  We have a grid that uses a directive inside the cell template to get display data...  For example, my data looks like this:\r\n    `var data = [\r\n    { resourceId: 123, roleId: 332 },\r\n    { resourceId: 998, roleId: 465 },\r\n    { resourceId: 653, roleId: 882 },\r\n    { resourceId: 564, roleId: 332 },\r\n    ];`\r\n\r\nThe grid itself uses a directive in the cellTemplate to get the \"name\" of the resource from a cached list.\r\n`var resourceCol  = {\r\n   displayName : 'Resource',\r\n   field : 'resourceId',\r\n   cellTemplate : '<div><get-name resource-id=\"row.entity.resourceId\"></get-name></div>'\r\n};`\r\n\r\nTwo questions:\r\n1. I assume that there is no simple trick to parse out the name written by the directive and sort using that... or is there?\r\n\r\n2.  While googling, I've looked at adding a sortingAlgorithm to the column definition, is there a way to get the entire row.entity object inside the sort function?  In this particular case, it may not help, but I can think of others where I will need to sort by another field in the dataset."},"comment":{"url":"https://api.github.com/repos/angular-ui/ui-grid/issues/comments/157626488","html_url":"https://github.com/angular-ui/ui-grid/issues/3219#issuecomment-157626488","issue_url":"https://api.github.com/repos/angular-ui/ui-grid/issues/3219","id":157626488,"user":{"login":"PaulL1","id":5248789,"avatar_url":"https://avatars.githubusercontent.com/u/5248789?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulL1","html_url":"https://github.com/PaulL1","followers_url":"https://api.github.com/users/PaulL1/followers","following_url":"https://api.github.com/users/PaulL1/following{/other_user}","gists_url":"https://api.github.com/users/PaulL1/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulL1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulL1/subscriptions","organizations_url":"https://api.github.com/users/PaulL1/orgs","repos_url":"https://api.github.com/users/PaulL1/repos","events_url":"https://api.github.com/users/PaulL1/events{/privacy}","received_events_url":"https://api.github.com/users/PaulL1/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T06:55:31Z","updated_at":"2015-11-18T06:55:31Z","body":"This is a useful request, but not really in the current roadmap.  We have far too many good ideas in the repository already, giving the impression that we have a project riven with defects.\r\n\r\nAccordingly, I am leaving the enhancement tag on this, but closing it.  If someone would like this functionality, we'd welcome a pull request that adds it."}}