I have an ASP .NET Datagrid in which I am trying to hide the delete and edit button columns if a certain condition is true (say, the value in one of the columns is X). I found a solution that is exactly what I need here;
Conditionally hide CommandField or ButtonField in Gridview
But it is for a GridView. I have not been able to find anything similar for a Datagrid, and I am not able to implement that solution. Does anyone have a solution similar to the one linked above, but for data grids? Thanks!