Best way to control Grid CRUD behavior

2 posts, 0 answers
  1. AkAlan
    AkAlan avatar
    121 posts
    Member since:
    Jun 2009

    Posted 19 Apr 2011 Link to this post

    What is the best way to control a RadGrids CRUD behavior depending on the users Role? I already have a grid built with all of the updating and deleting functionality built in. Now I want to allow only certain users the ability to update and delete.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Apr 2011 Link to this post

    Hello AkAlan,

    You can set the visibility of the buttons( Edit,Delete) based on the user roles in the ItemDataBoud Event like below.

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
           if (e.Item is GridDataItem)
               GridDataItem item=(GridDataItem)e.Item;
                   e.Item.FindControl("EditButton").Visible = false;//Using EditCommandColumn.

  3. DevCraft R3 2016 release webinar banner
Back to Top