advancedDatagrid multipleSelection: Was a row already selected?
Posted
by Werner
on Stack Overflow
See other posts from Stack Overflow
or by Werner
Published on 2010-06-03T15:21:43Z
Indexed on
2010/06/03
15:24 UTC
Read the original article
Hit count: 349
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);
}
© Stack Overflow or respective owner