The idea of using String.IsNullOrEmpty(..) is alright - but
before this method does its checking, you access the potentially "null-containing" property .Value with .ToString().
If the cell can only contain a String or null, then replace it with a simple cast to
String
and it'll work (or, at least it won't cause the exception any more):
if (!string.IsNullOrEmpty((string)dataGridView1.Rows[e.RowIndex].Cells["txtproname"].Value))
If the cell can contain contain something else than a string or null, then it's just a tiny bit more complex:
object cellValue = dataGridView1.Rows[e.RowIndex].Cells["txtproname"].Value;
if (cellValue != null && !string.IsEmpty(cellValue.ToString()))