4

Is there a way to assign custom data attributes for table rows generated by the WebGrid helper in Asp.Net MVC?

What I would like to end up with is something like this:

<tr data-foo="foo"></tr>
e11s
  • 4,123
  • 3
  • 29
  • 28

1 Answers1

4

No, AFAIK that's not possible. The best you could do on a tr is to apply a style and an alternating row style. I'd recommend MvcContrib Grid or Telerik Mvc Grid as more advanced alternatives to Microsoft's WebGrid helper.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928