AdvancedDatagrid multipleSelection:是否已选择一行?
在高级数据网格中进行多次选择后,我想检查单击的行是否已被选择。无论如何,我下面的想法(在嵌套的 if 子句中,我想检查新单击的项目的处理数据是否已经在添加的数组集合中)不起作用,但我认为必须有更好的方法来区分是否单击了已选择的行。
可能我的描述不够清楚,请提问!
非常感谢,已经提前了, 维尔纳
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);
}
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);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
tssss,ArrayCollection 有一个 contains 函数:
tssss, there is a contains function for ArrayCollection: