hi
u could use below function and call this function OnRowCreated=HighlightRow
in your grid view
protected void HighlightRow(Object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//find your control here whether its a textbox or label
Label lblValoreSeriale= (Label)e.Row.FindControl("lblValoreSeriale");
if(lblValorSeriale != null)
{
ifConvert.ToInt32((lblValoreSeriale.Text) > 50)
e.Row.BackColor = System.Drawing.Color.Aqua;
}
}
}
hope this helps
> Hi all,
>
[quoted text clipped - 31 lines]
> Thanks
> Marco
kjqua - 04 Jul 2007 08:20 GMT
Hi Puja,
I try your function but i have this error:
The type or namespace name 'GridViewRowEventArgs' could not be found
(are you missing a using directive or an assembly reference?)
The dataGridView1 is on the form.
LeggiSeriale.mdf is the name of my database
Seriale_1 Is the name of the Table
IdLeggiSeriale is the name of the 1 column in the Table Seriale_1
ValoreSeriale is the name of the 2 column in the Table Seriale_1
DataAcquisizione is the name of the 3 column in the Table Seriale_1
thanks
Puja ha scritto:
> hi
>
[quoted text clipped - 64 lines]
>> Thanks
>> Marco
Puja - 05 Jul 2007 01:41 GMT
are u using dot net version 2.0? i am using same code and it works fine.
> Hi Puja,
>
[quoted text clipped - 83 lines]
>>> Thanks
>>> Marco