I have a Grid View. I added AutoGenerateEditButton=True.
AutoGenerateEditButton=True
I want to display that button to users that belong to a certain role. If not the button is not rend
Anyway take into account this more correct code:
foreach (CommandField column in grdMovies.Columns.OfType) { column.Visible = false; }