Parameters:
view.attachEvent("onAfterSelect", function (id){ //any custom logic here });
In case of multi-select, event occurs only for items which was clicked, and not occurs for items which was selected by shift-click or similar actions. Event will not occur for ctrl-click which results in item unselecting. Basically while onBeforeSelect fires for both select and unselect actions, onAfterSelect will fire only for true selects.