Hierarchical Kendo UI Grid show/hide base on user security

2 posts, 1 answers
  1. Alexandre
    Alexandre avatar
    20 posts
    Member since:
    Apr 2014

    Posted 22 Oct 2014 Link to this post


    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?

  2. Answer
    Alexander Popov
    Alexander Popov avatar
    1444 posts

    Posted 24 Oct 2014 Link to this post

    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: 
      .ClientDetailTemplateId( isAuthorized ? "myTemplate" : "" )
    • 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) {
          e.detailRow.find("td:last").text("You are not authorized");

    Alexander Popov

    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.

Back to Top