Home > Default > Modify items in datagrid

Modify items in datagrid

November 30Hits:0
Advertisement
I have a datagrid that is bound to an array collection. Is
there a simpler way to modify the properties in the datagrid and
have the datagrid change to reflect the changes.. This is my
current code to alter on property and get the datagrid display to
update itself...
var item:Object = DGCollection.getItemAt (0);
item.label= "changed text";
DGCollection.itemUpdated(item);
This code will change the name of a row and update the
datagrid to display the changed text. I always thought that you
could use a one liner to do this same thing. Any ideas? or is this
how you do it

Answers

This is what I have:
[Bindable]
private var DGCollection:ArrayCollection = new
ArrayCollection ();
in a callback I receive data from the server and then i use
this line of code to populate the datagrid.
DGCollection.addItem (myObject);
and then here is my datagrid xml:
<mx:DataGrid dataProvider="{DGCollection}"
id="MyDataGrid">
<mx:columns>
<mx:DataGridColumn itemRenderer="MyRenderer1"
dataField="label" headerText="headerText"/>
<mx:DataGridColumn itemRenderer="MyRenderer2"
dataField="label" headerText="headerText"/>
</mx:columns>
</mx:DataGrid>
The data loads just fine but I thought since the datagrid was
bound to the collection that the ui what automatically update when
you change anything on the collection.
I've also tried this chunk of code to try to update the
collection:
DGCollection[myIndex].label = "test";
which doesn't work
is their a piece of code that I can use that updates the
collection automatically?

Read other 6 answers

Tags:

Related Articles

  • Modify items in datagridNovember 30

    I have a datagrid that is bound to an array collection. Is there a simpler way to modify the properties in the datagrid and have the datagrid change to reflect the changes.. This is my current code to alter on property and get the datagrid display to

  • Items in dataGridNovember 30

    Hello EveryOne I've datagrid & it is binded to dataProvider. when it displays data. I want to count the no. of rows visible. or should I say, i would like count items in datagrid similar as we do in .NET can anyOne help me. ThanksFirst this forum is

  • How to find and modify  item in a nested array collection?November 30

    Hi, would anybody know how to find and modify item in a nested array collection: private var ac:ArrayCollection = new ArrayCollection([ {id:1,name:"A",children:[{id:4,name:"AA",children:[{id:8,name:"AAA"}]},{id:5,name:"A

  • Updated GL7 Site to GL8 - Modified Items All necessary?November 30

    I updated one of my sites from 7 to 8. Upload Modified Items wants to upload all 2000+ items, including large .mov files and tons of jpegs. How should I proceed? Do I need to upload everything, all modified items? I recall I can mark them all so they

  • Syncing Issues and ever growing Modified items list...November 30

    Ok, I have a G4 Dual and a MBPro C2D which I use .Mac syncing to keep my iCal items synced up (sunk up? ... Anyway, although each calendar looks identical to each other, there seems to be some sort of confusion as when the desktop syncs, it tells me

  • WPF Finding Selected ComboBox Item Within DataGridOctober 11

    Hi all... I'm having an issue trying to access the selected item value in a ComboBox within a DataGridTemplateColumn.  Through another question/answer I have got the ComboBox displaying the names as it should but the next step I'm having issues with

  • [Solved]Portal 10.1.4 - Request Help to Modify Item Name using PL/SQL APIOctober 11

    I have a region on a page that contains content items. These are PDF files that were uploaded. I want to know how I can programmatically change the description. I have been looking at both set_attributes() and modify_item_post_upload() functions in t

  • BAPI to modify items and create new ones in Purchase OrderNovember 30

    Hi, everybody! We need to change purchase orders (PO's) using a BAPI. We need not only to modify and delete the existing items in a PO, but also create new items in the same PO. Is it possible to do that using the bapi called BAPI_PO_CHANGE? If it is

  • Modify Item details while submitting an orderNovember 30

    Hi Experts,   While submitting an order I need to modify one of the field in the item table when saving. So i am writing the code in the BADI ORDER_SAVE, method CHANGE_BEFORE_UPDATE . I have got the item details with me now in the BADI. How can i mod

  • How to modify item quantity in an scheduling agreementNovember 30

    Hi, I'm trying to modify target quantity (ekpo-ktmng) in an item of a scheduling agreement (you can see it in me33l transaction). When the users tries to modify, using me33l, the quantity of an item in an scheduling agreement, I need to pick this val

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.730 s.