Say I have the following RowDataBound event..
Rather than specifying the cell using it's ordinal value is there a more specific way that won't mean that I need to check/ update this event every time a new column is added to the Gridview control?
Sub ProductGridView_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
Dim myQty as Integer = CInt(e.Row.Cells(1).Text)
If myQty > 0 then
e.Row.Cells(3).Text = "In Stock"
e.Row.Cells(3).Text = "Not In Stock"