Please try this code to trigger the 'onSelectChanged' event. You only need to include the code to your page and do not need to paste it everywhere.
(function($){
$.extend($.fn.datagrid.defaults, {
onSelect: function(index, row){
var opts = $(this).datagrid('options');
if (opts.onSelectRow){
opts.onSelectRow.call(this, index, row);
}
if (opts.selectedIndex != index){
opts.selectedIndex = index;
if (opts.onSelectChanged){
opts.onSelectChanged.call(this, index, row);
}
}
}
})
})(jQuery);