Why is rowId a DOM element id instead of a data attribute?
Why is rowId a DOM element id instead of a data attribute?
![creativetags](https://secure.gravatar.com/avatar/9e0ad9c420de52f2d9e0513d448e579c/?default=https%3A%2F%2Fvanillicon.com%2F9e0ad9c420de52f2d9e0513d448e579c_200.png&rating=g&size=120)
Why <tr id="1" role="row"> and not <tr data-id="1" role="row">
This discussion has been closed.
Why <tr id="1" role="row"> and not <tr data-id="1" role="row">
Answers
To allow easy row selection with id values. You could use
createdRow
to assign a data property if you prefer.Allan
Chances are you want a numeric id which isn't valid HTML for the id attribute. Set it as a data attribute and that's not a problem.