hello every one,
i have gridview GridView2 and i use this method,
protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//int i=(int)e.Row.Cells[10].Text;
if (Decimal.Parse(e.Row.Cells[10].Text)<24)
{
e.Row.Cells[10].Style.Add("background-color","orange");
}
}
}
But it destroyed the sort option.
so when i click to sort by any column ,there was a runtime error like:
Input string was not in a correct format.
Line 431: {
Line 432: //int i=(int)e.Row.Cells[10].Text;
Line 433: if (Decimal.Parse(e.Row.Cells[10].Text)<24)
Line 434:
Line 435: {
I need help ASAP