Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

How to call the event ItemDataBound

 

this is my event

 

protected void grdReport3_ItemDataBound(object source, System.Web.UI.WebControls.DataGridItemEventArgs e)

{

 

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

{

 

DataRowView rv = (DataRowView)e.Item.DataItem;

 

 

DateTime iap = Convert.ToDateTime(rv.Row.ItemArray[3]);

DateTime iaa = Convert.ToDateTime(rv.Row.ItemArray[4]);

 

 

if (iaa > iap)

{

e.Item.BackColor = System.Drawing.Color.Red;

}

 

}

}

 

i have included in source code fro datagrid(its not getting through intellisense)

 

OnItemDataBound="grdReport3_ItemDataBound"

 

 

Please help how to fir this event.

 

Thanks in advance

 

pavan

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...