Adding value to dropdown at first place and changing the label name dynamically in javascript

Last Reply 7 days ago By avair1300

Posted 12 days ago

I have the list as shown below and i am trying to loop through the list and get the data.list[i].SubType.Name using

if (data.List && data.List.length > 0) {
    data.List.forEach(function(item) {
//Here i need to add select all to the list on the top for example we have 2 records with pre school in list for those two on top i need to add select all

//Similarly i have one record with KG need to select all for KG as well
 Students.loadDataViaReader(data.List);
}
}

I have total 3 items in the list using data.list[i].SubType.Name i am grouping all the list items of same name to one and to that items in same group i need to add select all at the top with checkbox and that label name should be select all when no items are selected and should be unselect all if all the items are selected

0: Abbreviation: null >StudentDetails : {ID:null, Name: ''} >SubType: {ID:6,Name: 'Preschool'}

1: Abbreviation: null >StudentDetails : {ID:null, Name: ''} >SubType: {ID:6,Name: 'KG'}

2: Abbreviation: null >StudentDetails : {ID:null, Name: ''} >SubType: {ID:6,Name: 'Preschool'}

You are viewing reply posted by: avair1300 7 days ago.
Posted 7 days ago

can anybody help me on this i had even shared my res.list data as well