After much searching I could not find a solution to position the insert,update,delete column that is by default on the left 1st column. so after solving I thought I would share how to do.
you will have to make a virtual field mark as label and position far right.
put this code in OnScriptini.
echo "
<script>
$(document).ready( function() {
$(’[id^=“hidden_field_data_sc_actions”]’).each(function(){
var id = $(this).attr(‘id’).replace(/[^0-9]+/i,’’);
$(this).parent().children().last().remove();
$(this).parent().prepend(’<td></td>’);
$(this).appendTo($(this).parent());
});
var timer = 0;
$(’#sc_b_new_t’).click(function() {
do_ajax_form_your_form_name();
timer = setInterval( function() {
$(’[id^=“sc_ins_line_”]’).each(function(){
var id = $(this).attr(‘id’).replace(/[^0-9]+/i,’’);
var td =$(this).parent();
td.parent().children().last().remove();
td.parent().prepend(’<td></td>’);
td.appendTo(td.parent());
clearInterval(timer);
});
}, 5);
});
});
</script>
";
Then in Onafterinsert
sc_commit_trans()
sc_redir(your_form_here);
hope this may be of use to someone.