If you do not want to display an Edit column in your grid, then you can either avoid using EditCommandColumn or set AutoGenerateEditColumn to false.
If you want to display Edit column but still disable editing for rows using code, then you can try the following:
cs: