Show Error icon in Datagridview
<p>I want to show the error text and icon on a datagridview specific cell when this event is fired</p>

<pre><code>private void dataGridView1_CellValidating(object sender, DataGridViewCellValidatingEventArgs e)
</code></pre>

<p>how can i do that? </p>

<p>i tried the following: </p>

<pre><code>if (int.Parse(dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString()) &gt; nbsstatus)

dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].ErrorText = "Max Social Status is " + nbsstatus;
e.cancel=true;
</code></pre>
