Yes.

Anyway for posterity, I've implemented the workaround, which is
manually creating new DataGridColumn objects, then assigning it to the
columns property in my DataGrid. It works fine, and wasn't too much work.

The takeaway lesson: if you modify the DataGrid.columns property, then
 you are forever stuck manually updating it. Databinding on the
DataGrid.dataprovider property modifies cells within columns, not
adding or removing the columns themselves. (It works fine for rows, btw).

Eugene


--- In [email protected], "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Are you re-assigning the columns array to the columns property?
> 
> Tracy
> 
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of eughuang
> Sent: Tuesday, April 10, 2007 3:35 PM
> To: [email protected]
> Subject: [flexcoders] DataGrid doesn't always show new columns when
> dataprovider is updated
> 
>  
> 
> I ran into some difficulty using DataGrid, but it's a bit tricky to
> describe.
> 
> Steps to reproduce:
> 
> 1. create a DataGrid using a dataprovider (databinding to an
> ArrayCollection).
> 2. obtain the DataGrid.columns, modify, and set it back again.
> 3. update my dataprovider's data, by adding more columns.
> 4. result: the new columns don't get reflected in the DataGrid.
> 
> The critical step is step 2, which modifies the DataGrid's columns
> configurations. I suppose this behaviour is expected and ok.
> 
> My question is: is there some way to reset the columns back to the
> default, so that new columns in my data will be displayed, or do I
> have to manually create and add new DataGridColumn objects?
> 
> Hope that makes sense, and any help appreciated!
> 
> If this is not the right forum for these types of questions, please
> let me know what is.
>


Reply via email to