Arvind Yadav

Arvind Yadav

  • NA
  • 49
  • 155.2k

How to genrate dynmic class to each row of gridview in asp.n

Sep 13 2013 6:43 AM
Hi Friends,
                   I want to genrate dynamic class to each row of gridview of asp.net. like if header row then i am giving class = "hdr" to header row. and if row is datarow then i want to give "chk" to each datarow. because using this class i m writing some code. but this class of gridview is not genrated.  my code on GridvViewRowDataBound is like,

If  e.Row.RowType = DataControlRowType.Header Then
            
                e.Row.CssClass = "hdr"

End If



If  e.Row.RowType = DataControlRowType.Datarow Then
            
                e.Row.CssClass = "chk"

End If
               

Answers (1)