I'm trying to disable sortablerows functionality from a grid. I'd like to have the ability to toggle on/off the sortablerows functionality. Enabling the feature is pretty straightforward:
jQuery("#list").jqGrid('sortableRows', {
update: function(event, ui) { updateOrder() }
});
But disabling the feature has proven to be a little bit harder. I've consulted the UI Integrations where sortableRows
is documented in the jqGrid Wiki:
www.trirand.com/jqgridwiki/doku.php?id=wiki:jquery_ui_methods
And found that "The method is fully compatible with jQuery UI sortable widget." So I ventured off to the jQuery UI sortable documentation and found this:
http://jqueryui.com/demos/sortable/
jQuery("#list").jqGrid('sortableRows', {disabled: true});
The code above simply disables the rows. So I moved onto the destroy
method:
jQuery("#list").jqGrid('sortableRows', {destroy: true});
but that doesn't do anything. Based upon the documentation the destroy
method seems to be exactly what I need, so maybe my syntax is wrong but I can't seem to get it to work.
Does anyone have experience with this same issue?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…