Interactive Grid - Row numbering
Numbering rowswhenn adding new with increment 10
var highest=Math.max(10,Number($v("P5_NEXT_INDEX")));
var model = this.data.model;
var meta = model.getRecordMetadata(this.data.recordId);
$(".sortorder").each(function(){
if(this.textContent!="") {
highest=Math.max(highest,parseFloat(this.textContent));
console.log('----------ssss--------------->'+highest)
}
});
if ( meta.inserted && !meta.updated && !meta.deleted && !meta.agg) {
$s("C_INDEX", highest);
$s("P5_NEXT_INDEX", Number(highest)+10);
}
function(config) {
config.defaultGridColumnOptions = {
linkTargetColumn: 'LIST_CONFIG',
linkText: 'Edycja Listy'
};
return config;
}