It is still not happening for me. However I noticed one thing. Due to the following block of code the datalist is behaving uniquely in the sense that the separation or rather the spacing from the left side border is gradually increasing with the last post
having the greatest spacing from the border of the datalist and the first post having the least spacing. Why is that? Where is the error in the code block?
As prescribed I used the following blcok of code:---
PGChoudhury
Member
11 Points
131 Posts
Re: Datalist Color Changing on Clicking a Button ---
May 06, 2012 04:19 PM|LINK
It is still not happening for me. However I noticed one thing. Due to the following block of code the datalist is behaving uniquely in the sense that the separation or rather the spacing from the left side border is gradually increasing with the last post having the greatest spacing from the border of the datalist and the first post having the least spacing. Why is that? Where is the error in the code block?
As prescribed I used the following blcok of code:---
protected void dLMessages_ItemDataBound(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["AcceptedAnswer"] == "True") { e.Item.BackColor = Color.LightCyan; } } }