ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to set multiple data-key as Id on every row
Title:
B
I
{code}
?
I have bind one grid using awesome , but i have need to bind some data-attribute on every row for my inner logic. example : `<tr data-lvl="1" data-k="101" class="awe-row awe-selectable">` . Here my primary key Id bind as data-k="101", but I need to bind some extra attribute on every table row, like `<tr data-lvl="1" data-k="101" data-name="vac" data-conflict="Yes" class="awe-row awe-selectable">.` In above tr, "data-name" and "data-conflict" is data attribute that I have need. Please give me suggestion, How to set extra attributes on every row
Save Changes
Cancel
Rutul Patel
asked at 30 Jan 2017
please explain why do you need data-name and data-conflict
at 30 Jan 2017
Omu
Thank you for your reply. I have need to set some extra data attribute for getting value of property, like In "data-k" attribute set primary Id attribute, Same as like I need to set more data value like 'data-name = position1' or something like that.
at 31 Jan 2017
Rutul Patel
you can get the row model using `$row.data('model')`; for example to get the Name you could do `$('#Grid1').find('.awe-row:first').data('model').Name`
at 31 Jan 2017
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK