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.
我有一个列表网格,它显示从 Rest 数据源检索的记录。当我重置列表网格时,它会清除列表网格中的所有记录。但是已经选择的记录保持不变。我的需要是,所选记录在重置后不应保持选中状态。我试过invalidatecache、redraw、setData。但没有任何效果。有什么建议吗?
我认为这种方法应该有效。
listGrid.deselectRecord(record);
所以你可以做这样的事情:
listGrid.deselectRecord(listGrid.getSelectedRecord());
或者,如果这不起作用,您可以尝试选择网格中的第一条记录:
listGrid.selectRecord(0);