Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我的代码有一个问题,我用这样的插件创建了一个网格:
http://www.sencha.com/examples-2/#gridplugins(第二个网格)
好吧,现在我需要知道单击按钮时选择了哪些项目。我该怎么办 ?
使用网格GridSelectionModel(假设您的数据是ModelData,用任何合适的替换):
GridSelectionModel
ModelData
ModelData item = grid.getSelectionModel().getSelectedItem();
或者
List<ModelData> items = grid.getSelectionModel().getSelectedItems();