The ArrayCollection object will be populated only when you will have
more then one object in your recordset. Now for displaying one record in
data grid you first need to count the length of populated
ArrayCollection object if it contain more then one record then simply
say datagrid.dataprovider = ArrayCollection object and if the length of
ArrayCollection is 0 or object in null then take your database reord in
an object say myObj : Object = database record and then set
datagrid.dataprovider = my...