|
-
Aug 14th, 2012, 01:21 PM
#1
Thread Starter
New Member
Color Coding Rows (Not working)
Below is the source code that tries to highlight rows in certain colors depending on value of the certificate. The code runs, but the colors are not showing up. Am i missing something here? Any help would be appreciated. Kudos!
If e.Row.RowType = DataControlRowType.DataRow Then
If CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") <100000 Then
e.Row.BackColor = System.Drawing.Color.lightblue
elseIf CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") < 1000000 And ("Certificate") > 100000 Then
e.Row.BackColor = System.Drawing.Color.lightGreen
elseIf CType(sender, GridView).DataKeys(e.Row.RowIndex).Values("Certificate") < 10000000 And ("Certificate") > 1000000 Then
e.Row.BackColor = System.Drawing.Color.lightyellow
else
e.Row.BackColor = System.Drawing.Color.blue
End if
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|