flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scott matheson <sc...@matheson.it>
Subject Selecting all items on a dataGroup
Date Sat, 25 Mar 2017 19:05:23 GMT
Hi
    i want to selecta ll the items in a dataGrid, i was trying to populate the selectedItems,
 any ideas 

thanks 



private function selectAll():void{

    dg.selectedItems = null;

   var _user;
   for each( _user in this._listofUser){
        dg.selectedItems.push(_user);
   }

}



<s:DataGrid id="dg"  width="300" height="500" dataProvider="{this._listofUser}"
         selectionMode="multipleRows"

   <s:columns>
      <s:ArrayCollection>

         <s:GridColumn headerText="First" dataField="firstName" minWidth="50"  />
         <s:GridColumn headerText="Surname" dataField="surname"  minWidth="70"  />


      </s:ArrayCollection>
   </s:columns>


</s:DataGrid>



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message