Displaying Edit button in GridView based on Role

后端 未结 2 1063
感动是毒
感动是毒 2021-01-29 04:12

I have a Grid View. I added AutoGenerateEditButton=True.

I want to display that button to users that belong to a certain role. If not the button is not rend

2条回答
  •  时光说笑
    2021-01-29 04:28

    Anyway take into account this more correct code:

    foreach (CommandField column in grdMovies.Columns.OfType)
    {
        column.Visible = false;
    }
    

提交回复
热议问题