Adding an attribute to the grid

3 replies. Last post: May 20, 2013 12:05 AM by Bernard Xiang
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

I have tried adding an attribute to the grid in the Load_Page method of the page as follows:


grid.Attributes.Add("data-customattribute", "value");


However, when the page is rendered, the attribute is nowhere to be found. Are you specifically preventing custom attributes from being created and attached to the grid? Is there another way I can create a custom attribute on the grid?

I've noticed that this functionality seems possible at the row and cell level, however it doesn't seem possible for the actual grid.

Should I be adding the attributes to a child element of the grid? If so, can you give a code example?

All times are GMT -5. The time now is 5:42 PM.
Previous Next