gridview row eval: column as name parameter instead of index
<p>I have a gridview and the OnRowDataBound event is linked to this function:</p>

<pre><code>if (e.Row.RowType == DataControlRowType.DataRow)
{
    ThisRow = e.Row.DataItem as MyObjectModel;

    if (ThisRow.Property1 == null) { e.Row.Cells[5].Text = "-"; }
</code></pre>

<p>This code looks at the value of a property of the object in the data source and if it's null, converts the null to display "-" in column 5. The problem I'm having is that if I change the order of the columns of the gridview, then I need to change the index of every other modification.
What I'd like to do is change the statement "e.Row.Cells[5].Text" to something that says "the cell whose column header is xyz".</p>

<p>Any suggestions?</p>

<p>Thanks.</p>
