I've been working at this and can't seem to come up with a way to make it work.
I have a grid that designates specific rows as having errors. On these rows, and these rows only, I want to display the Edit command to display an edit form template.
Here is my code behind for catching and identifying the bad records. How can I tie into this to either set my edit command text to "Error..." or "" depending on if I want it to show or not.
[code]
protected void rgridOrders_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
bool _isError = Convert.ToBoolean(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["IsError"].ToString());
if (_isError)
{
GridItem dataItem = e.Item;
dataItem.BackColor = System.Drawing.Color.FromArgb(255, 220, 220);
dataItem.ForeColor = System.Drawing.Color.Red;
}
}
}
[/code]