I manage to implement an hierarchical Kendo UI Grid successfully. However the specifications for the application that I'm building requires that the child grid be only displayed if the current user have the authorization. How can I achieve this?
1 Answer, 1 is accepted
0
Accepted
Alexander Popov
Telerik team
answered on 24 Oct 2014, 07:53 AM
Hello Alexandre,
This could be achieved in a few ways:
Use a condition in the Grid initialization options and pass either a valid template ID or an empty string. For example:
Subscribe to the Grid's dataBound event. Once the event is triggered check whether the user is authorized and if it not - hide all the expand/collapse arrows
Subscribe to the detailExpand event and replace the template output with a notification. For example:
function onDetailExpand(e) {
if(!user.isAuthorized){
e.detailRow.find("td:last").text("You are not authorized");
}
}
Regards,
Alexander Popov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.