0 Replies Latest reply on Aug 12, 2007 5:54 PM by dkerr

    default selectedItems

      How do you pre-select default items in a datagrid?

      If my arraycollection dataprovider to myGrid contains CategoryID and Category, how do I auto select rows that are equal to one or more default selected CategoryIDs?

      the defaults would come from another "myDefaults" ArrayCollection containing the default CategoryID and Category pairs.

      I assume I'd do a creationComplete on the dataGrid:

      then in setDafaults, loop through myDefaults arrayCollection to change the grid items to "selected" if CategoryID equal to mydefaults.CategoryID .

      I want all items to be listed, just highlight/select the defaults after the grid is populated.

      Don Kerr