开发者

How can i do select multiple rows ( allowMultipleSelection="true" ) in datagrid using flex?

开发者 https://www.devze.com 2022-12-12 05:18 出处:网络
I have id(array) used in my application . i want to select number of rows mathching given array but if i used gatagrid selected Index then it will be selected only 开发者_运维问答one row only . i set

I have id(array) used in my application . i want to select number of rows mathching given array but if i used gatagrid selected Index then it will be selected only 开发者_运维问答one row only . i set data grid allowMultipleSelection="true" also .. . how can be select mutipule rows in datagrid ? please refer me

for(var i:int=0;i<id.length;i++)
        {

            datagrid.selectedIndex=id[i];
        }


If id is an array of integers, you should be able to do this:

datagrid.selectedIndices = id;


try setting them through selectedItems instead that allows you to set multiples.

0

精彩评论

暂无评论...
验证码 换一张
取 消