During a DataBind, I'd like to access an earlier row to do conditional formatting. I need help completing the following code:
protected void RadGridX_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = e.Item as GridDataItem;
if (item["Name"].Text == "RowIWant")
{
foreach(string colName in colNames)
{
//get this value
int thisValue = Convert.ToInt32(item[colname].Text);
// get the value from the RowToCompare
int earlierValue = ???
}
}
}
}
protected void RadGridX_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = e.Item as GridDataItem;
if (item["Name"].Text == "RowIWant")
{
foreach(string colName in colNames)
{
//get this value
int thisValue = Convert.ToInt32(item[colname].Text);
// get the value from the RowToCompare
int earlierValue = ???
}
}
}
}