Mark,
In addition to Phillip's answer, I think that you could do something like
this: Set up a RowDataBound event handler for your GridView. You can then
set the visible attribute of a buttonfield like this:
Button button = (Button)e.Row.Cells[1].Controls[0];
button.Attributes.Add("visible", "false");
Of course, the index that you use to access the right cell will vary
depending on the layout of your grid. I used Cells[1] just as an example.
--Rob Roberts
"MarkAurit" <Ma*******@discussions.microsoft.com> wrote in message
news:E5**********************************@microsof t.com...
I have a gridview with some boundfields and buttonfields, and based on the
user's role I want to modify their attributes: for example, if the
person's
role doesnt allow updates, I want to set a buttonfields visible attribute
to
"false". I know how to get data values from a clicked column, but I
havent
been able to find out how to modify the columns such as in the above
scenario
when the gridview loads.
Any help is very appreciated.