Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternatng rows not getting ItemDataBound msg

Status
Not open for further replies.

bthale

Programmer
Oct 31, 2001
108
US
I have a DataGrid and I do some formating of cell colors during the ItemDataBound event. For some reason, every other row is either not raising an event, or is not getting formated.

I'm using this code:
DataGridItem item = e.Item;
if (item.ItemType == ListItemType.Item)
{
// do the formatting
}

should I also include ListItemType.AlternatingItem?
 
post this question in ASP.NET forum

anyways try this:

if (item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem )

-DNG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top