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 assign a unique Id to the grid table
Title:
B
I
{code}
?
trying to implement Drag & Drop Rows feature in Grid and we have multiple Grids in the same view. Need to write custom JS code to implement the same. Please advise how to assign a unique Id to the table under DIV with class="awe-mcontent"?
Save Changes
Cancel
samp
asked at 12 Feb 2016
you shouldn't need that, you already have the grid id (main div), so you can do $('#gridid .awe-mcontent table')
at 12 Feb 2016
Omu
$("table").sortable({ items: "tr", cursor: 'move', opacity: 0.6, update: function () { var abc = $(this); var ids = []; Here abc is the current table object. What's the easy way to find out the Grid Id using the table object.
at 12 Feb 2016
samp
var $grid = abc.closest('.awe-grid'); var gridId = $grid.attr('id');
at 12 Feb 2016
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