advancedDatagrid multipleSelection: Was a row already selected?
- by Werner
Hi,
after multiple Selection in a advanced datagrid, I want to check if the clicked row, was already selected. Anyway my idea below (in the nested if clause I want to check if the newly clicked item's processing data is already in the added Array Collection) is not working, but I assume there must be a better way to differiante if an click was made on a already selected row.
Probably I was not as clear in my description as needed, please ask your questions!
Thank you very much, already in advance,
Werner
model.processingData = out;
if (model.selectedIndices.length > 1){
//check if item already added
var tempInt:int = model.multipleProcessingData.getItemIndex(model.processingData);
if (tempInt == -1){
model.multipleProcessingData.addItem(model.processingData);
}
} else{
model.multipleProcessingData.removeAll();
model.multipleProcessingData.addItem(model.processingData);
}