Of course, you have to replace UserHasNoEditRights and UniqueNameOfGridEditCommandColumn with your values/variables.
-----------------------------------------------------------------------------------
Ok, it was not exactly what do you want. More accurate answer to your question is: