Problem not yet solved. I don't knwo what is happening. I tried to integrate the following piece of code but it is not working as per desired. The code is creating a series of outlines in that color specified insteAad of changing the color of the particular
row to that specified color. Everything seems ok with the code apparently. But I'm sure I'm making some silly mistake somewhere. Please help me with this typical situation.
PGChoudhury
Member
11 Points
131 Posts
Re: Datalist Color Changing on Clicking a Button ---
Apr 29, 2012 02:54 PM|LINK
Problem not yet solved. I don't knwo what is happening. I tried to integrate the following piece of code but it is not working as per desired. The code is creating a series of outlines in that color specified insteAad of changing the color of the particular row to that specified color. Everything seems ok with the code apparently. But I'm sure I'm making some silly mistake somewhere. Please help me with this typical situation.
protected void dl_RowDataBound(object sender, DataListItemEventArgs e) { if(e.Item.ItemType==ListItemType.Item||e.Item.ItemType==ListItemType.AlternatingItem) { DataRowView drv=(DataRowView)(e.Item.DataItem); if(drv!=null) { if(drv.Row["AcceptedAnswer"].ToString()=="True") { e.Item.BackColor=Color.LightCyan; } } } }Kindly help me out.