can somebody tell m,
what's the error in below code-where all the columns with sex="male" should be displayed with color choclate in datagrid...plz
--------------------------------------
Protected Sub datagrid1_itemdatabound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles datagrid1.ItemDataBound
If (e.Item.ItemType = ListItemType.Item) Or (e.Item.ItemType = ListItemType.AlternatingItem) Then
Dim str As String
If (e.Item.Cells(3).Text.Equals("male")) Then
'If e.Item.DataItem(2) = Convert.ToString("male") Then
e.Item.Cells(0).BackColor = Color.Chocolate
End If
preetham.saroja -5 Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.