applying different styles to item and alternating item in datagrid
-
Hi, In my datagrid, i use one column as template column.In that template column i use hyperlink.I need to apply different styles to items and allternating to this hyperlink. I know applying styles to items and alternating items. But really confused in the above situation..:^) any suggestions???
All I ever wanted is what others have....
CrazySanker -
Hi, In my datagrid, i use one column as template column.In that template column i use hyperlink.I need to apply different styles to items and allternating to this hyperlink. I know applying styles to items and alternating items. But really confused in the above situation..:^) any suggestions???
All I ever wanted is what others have....
CrazySankerHi , I got one solution,but i dont know is it correct or not..Anyway its working..
protected void DGShowCount_ItemDataBound(object sender, DataGridItemEventArgs e) { if (e.Item.ItemType != ListItemType.Header & e.Item.ItemType != ListItemType.Footer) { HyperLink HprWiat = (HyperLink)e.Item.Cells[1].FindControl("HprWiat"); if (e.Item.ItemType == ListItemType.AlternatingItem) { HprWiat.CssClass = "Pendinglink"; } else { HprWiat.CssClass = "Pendinglink1"; } } }
All I ever wanted is what others have....
CrazySanker