//get the list of contacts from contact.cfc contacts = createObject("component","contacts"); contactsQuery = contacts.getAll(); cfGrid - Check boxes var contactList = contactList; var confirm = function (evt) { if (evt.detail == mx.controls.Alert.OK) { for(var i:Number = contactList.length-1; i >= 0; i--) { var item:Object = contactList.dataProvider[i]; if(item.checked.toString() == "true") { contactList.selectedIndex = i; GridData.deleteRow(contactList); } } } } alert("Are you sure you want to remove the checked records?", "Warning", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, confirm); if(selectBtn.label == "Check all") { for(var i:Number = 0; i < contactList.length; i++) { contactList.editField(i, "checked", "true"); } selectBtn.label = "Uncheck all"; } else if(selectBtn.label == "Uncheck all") { for(var i:Number = 0; i < contactList.length; i++) { contactList.editField(i, "checked", "false"); } selectBtn.label = "Check all"; }