I use the JQuery.Sortable () function to create a reorderable list of such items
<script type="text/javascript">
$(document).ready(function() {
$("#goal-list").sortable({
handle: '.handle',
placeholder: 'ui-state-highlight',
update: function() {
var order = $('#goal-list').sortable('serialize');
$("#info").load("/goals/process?" + order);
}
});
});
</script>
The returned result is a comma-delimited list of the element identifier (i.e. 1,2,3,4,5,6, etc.)
What I want to know is the best way to fix this in the sort column of a table of related items ... I could scroll and update each record, but I think that there are a lot of records in the database and it could be a potential bottleneck, especially if the list is quite large.
I am using LINQ-to-SQL and ASP.NET MVC
source
share