gridview rowdatabound change cssclass and selectedrowstyle cssclasshelp

P

Peter

Hello All

I was wondering if someone can help me out with this

I added a piece of code to change the background color on a gridview row
based on some criterias.

The code works great, but my problem is that my selectedrowstyle doesn't
work anymore.
I set my gridview properties to selectedrowstyle->cssclass->gridselecteditem

Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim fd As dataSet.fdRow = CType(CType(e.Row.DataItem,
Data.DataRowView).Row, DataSet.fdRow)
If fd IsNot Nothing Then
If Not fd.IsapprDtNull Or Not fd.IsapprDtNull() Then
e.Row.CssClass = "highlightClosed"
End If
End If
End If
End Sub

How can I get around this

Thanks
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top