IzzyTwinkly
asked on
why do I need to check 'e.Row.RowType == DataControlRowType.DataRow'?
Hi
I have a GridView control and I have following RowdataBound event. I understand that this event is rased for each row, but I don't understand the
'if (e.Row.RowType == DataControlRowType.DataRow )' part.
I guess 'e.Row.RowType' means Current row's row type, correct?
As I know, 'DataControlrowType.DataRo w' means a data row of data control.
What does that mean if these two are equal???
protected void GridView1_RowDataBound(obj ect sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow )
{
//Get the price for this row.
// if price > $50, change the background color.
}
}
I have a GridView control and I have following RowdataBound event. I understand that this event is rased for each row, but I don't understand the
'if (e.Row.RowType == DataControlRowType.DataRow
I guess 'e.Row.RowType' means Current row's row type, correct?
As I know, 'DataControlrowType.DataRo
What does that mean if these two are equal???
protected void GridView1_RowDataBound(obj
{
if (e.Row.RowType == DataControlRowType.DataRow
{
//Get the price for this row.
// if price > $50, change the background color.
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
even => event
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Lol, what he said
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank u all~~~