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.
我有我的数据网格,我想在其他用户交互上选择多行而不是程序预期的行。我想知道,我是否可以仅根据代码以编程方式选择一些行?
谢谢,马库斯
您可以将 selectedIndices 属性设置为索引数组,或将 selectedItems 属性设置为项目数组。
例如:
myDataGrid.selectedIndices = [1,2,5,8];