Hi guys,
I want to compare a cell text / uniquefield.value to the same field above.
If the text is the same as above (double post) I want to make the text red.
I thought this shouldn't be so hard, but my approach isn't working.
My first thought was to have a public string that I change in the databound event once I've compared it to the cell text:
This doesn't work, it always returns true and the text is always red.
My second try was this:
But it has the same result, always true and all fields red.
I must be missing something obvious here, can anyone spot it?
Regards,
-DJ-
I want to compare a cell text / uniquefield.value to the same field above.
If the text is the same as above (double post) I want to make the text red.
I thought this shouldn't be so hard, but my approach isn't working.
My first thought was to have a public string that I change in the databound event once I've compared it to the cell text:
Dim nameCell As TableCell = dataItem("Name") |
If nameCell.Text = strLastPlayer Then |
nameCell.ForeColor = Drawing.Color.Red |
End If |
strLastPlayer = nameCell.Text |
This doesn't work, it always returns true and the text is always red.
My second try was this:
If e.Item.ItemIndex > 0 Then |
Dim intPrev As Integer = e.Item.ItemIndex - 1 |
Dim prevItem As GridDataItem = RadGrid1.Items(intPrev) |
Dim nameCell As TableCell = dataItem("Name") |
Dim prevNameCell As TableCell = prevItem("Name") |
If nameCell.Text = prevNameCell.Text Then |
nameCell.ForeColor = Drawing.Color.Red |
End If |
'strLastPlayer = nameCell.Text |
End If |
But it has the same result, always true and all fields red.
I must be missing something obvious here, can anyone spot it?
Regards,
-DJ-