 <p>If I understood correctly, you need something like this:</p> <pre><code>foreach(datarow r in datatable.rows) { if(((int)r["Menu_ID"])==7) { //Don't apply CSS } else { //Apply CSS } } </code></pre> <p>this is assuming your Menu_ID column is numeric. If it is a string, change to:</p> <pre><code>if(((string)r["Menu_ID"])=="7") </code></pre>