Hi Bhagyasri,
Thanks for contacting Syncfusion support.
Query1: To save and retrieve the selected data in dual list-box on initial rendering.
We have checked your reported query. We can able to save the selected data and apply the saved data in dual list box on initial rendering, please find the below code example.
[app.component.ts]
|
updateCollection() {
var aData = this.listObj1.value; // it returns the selected value of 1st list box
var bData = this.listObj2.value; // it returns the selected value of 2nd list box
if (aData.length > 0) {
localStorage.setItem('dataA', JSON.stringify(aData));
}
if (bData.length > 0) {
localStorage.setItem('dataB', JSON.stringify(bData));
}
}
onCreated() {
var aDataCol = JSON.parse(localStorage.getItem('dataA') || '{}');
if (aDataCol.length > 0) {
this.listObj1.value = aDataCol;
localStorage.removeItem('dataA');
}
var bDataCol = JSON.parse(localStorage.getItem('dataB') || '{}');
if (bDataCol.length > 0) {
this.listObj2.value = bDataCol;
localStorage.removeItem('dataB');
}
} |
Initially select the list items using checkbox and click the send selected value button to store into the local storage or send the values to the backend. Then refresh the sample, dual list box will renders with the previously stored value.
For your reference we have prepared a sample, please find the below link
Query2: Is there any feature for sorting and filtering the data in dual list-box?
Ans: We have checked your query and we suggest you to please refer the below documentation link,
Could you please check the above details and get back to us if you need further assistance on this.
Regards,
Thaneegairaj S