G
Guest
This is what i'm using and it seems way too complicated!! for finding a data
item.
I hope some one has a better way?
private void fn_setRankingColor(GridViewRow gvr)
{
Label lbl = gvr.FindControl("lbl_RANKINGTODAY") as Label;
if ((Int32)((DataRowView)gvr.DataItem).Row["RN"] ==
(Int32)((DataRowView)gvr.DataItem).Row["RNP"])
{
}
else if ((Int32)((DataRowView)gvr.DataItem).Row["RN"] <
(Int32)((DataRowView)gvr.DataItem).Row["RNP"])
{
lbl.ForeColor = Color.DarkGreen;
lbl.Font.Bold = true;
}
else
{
lbl.ForeColor = Color.DarkRed;
lbl.Font.Bold = true;
}
}
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)
kes
item.
I hope some one has a better way?
private void fn_setRankingColor(GridViewRow gvr)
{
Label lbl = gvr.FindControl("lbl_RANKINGTODAY") as Label;
if ((Int32)((DataRowView)gvr.DataItem).Row["RN"] ==
(Int32)((DataRowView)gvr.DataItem).Row["RNP"])
{
}
else if ((Int32)((DataRowView)gvr.DataItem).Row["RN"] <
(Int32)((DataRowView)gvr.DataItem).Row["RNP"])
{
lbl.ForeColor = Color.DarkGreen;
lbl.Font.Bold = true;
}
else
{
lbl.ForeColor = Color.DarkRed;
lbl.Font.Bold = true;
}
}
--
(i''ll be asking a lot of these, but I find C# totally way cooler than vb
and there''s no go''n back!!!)
thanks (as always)
kes