Hi trex0911,
Refer the below link.
If you want disable the button then use the below script.
<script>
$(function () {
$('[id*=btnUpdate]').attr("disabled", true);
$("[id*=gvLocations]").sortable({
items: 'tr:not(tr:first-child)',
cursor: 'pointer',
axis: 'y',
dropOnEmpty: false,
start: function (e, ui) {
ui.item.addClass("selected");
},
stop: function (e, ui) {
ui.item.removeClass("selected");
$('[id*=btnUpdate]').attr("disabled", false);
},
receive: function (e, ui) {
$(this).find("tbody").append(ui.item);
}
});
});
</script>
If you want to hide the button initially then use the below script.
<script type="text/javascript">
$(function () {
$('#btnUpdate').hide();
$("[id*=gvLocations]").sortable({
items: 'tr:not(tr:first-child)',
cursor: 'pointer',
axis: 'y',
dropOnEmpty: false,
start: function (e, ui) {
ui.item.addClass("selected");
},
stop: function (e, ui) {
ui.item.removeClass("selected");
$('#btnUpdate').show();
},
receive: function (e, ui) {
$(this).find("tbody").append(ui.item);
}
});
});
</script>