Please see the image to know what is my query. i am adding value into segment. if i am deleting a selected index. the s.no num need to be changed. i.e, if i am deleting the 2nd row the 3rd rows s.no should become 2.0... How to achieve it?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

I Used count for increamenting the s.no:

function visible(f) {

if(frmTask1.txtGrade.text!==null && frmTask1.txtQuantity.text!==null) {

frmTask1.flxMainSegment.isVisible=true;

var b= frmTask1.txtGrade.text;

var c= frmTask1.txtQuantity.text;

count += 1;

f = count;

var json={"lblSno":f,

"lblGrade":b,

"lblQuantity":c,

"btnDelete":{text:"Delete",onClick:Del}};

arr.push(json);

frmTask1.segmentGetvalue.setData(arr);

frmTask11.segmentDisplay.setData(arr);

} else {

alert("Both text are mandatory");

}

}

Hi ,

Your serial number is part of master data which you assigned to segment widget, when delete any record from the segment it won't change the serial number. It's developer responsibility that developer has to read the deleted record data and modify the segment master data and reset it to segment to get the ordered serial number.