Posted 24 February 2021, 9:57 am EST
Hello,
Can we restrict duplicate value to be added in wijmo listbox?
addFlag: boolean = false;
addRecord() {
this.addFlag = false;
if (
this.recordData.indexOf(this.fullname.trim()) == -1 &&
this.fullname.trim() != “”
) {
this.getWorkflowListItem.forEach((element, index) => {
if (element.Name == this.fullname.trim() && element.hide) {
this.getWorkflowListItem[index].hide = false;
this.getWorkflowListItem[this.index][“Action”] = 0;
this.tabConfigOptions.push({
ID: this.getWorkflowListItem.length + 1,
Rank: 1,
Name: this.fullname.trim(),
RollForward: false,
Action: 0,
roworder: this.getWorkflowListItem.length + 1
});
this.addFlag = true;
}
});
}
if (!this.addFlag) {
let id = 1;
this.getWorkflowListItem.push({
ID: this.getWorkflowListItem.length + 1,
Rank: 1,
Name: this.fullname.trim(),
RollForward: false,
Action: 0,
roworder: this.getWorkflowListItem.length + 1
});
this.tabConfigOptions.push({
ID: this.getWorkflowListItem.length + 1,
Rank: 1,
Name: this.fullname.trim(),
RollForward: false,
Action: 0,
roworder: this.getWorkflowListItem.length + 1
});
this.recordData.push(this.fullname);
this.name = new CollectionView(this.recordData);
}
this.showCheckboxes = true;
this.saveListBoxData();
this.fullname = “”;
}
Thank you.
Regards,
Nivisha