Creating Empty Datagrid inFlex
I have a flex datagrid in a popupwindow.That datagrid should be empty means there is no dataprovider.User will provide data.For that purpose I have to make datagrid columns editable.I tried with editable property.It is not working.And also one more requirment is whenever user completed entering of first row data,next row has to be displayed with empty ce开发者_运维知识库lls.Can anyone help me.
The datagrid should be displayed with editable empty fields.
You need to set a dataprovider for the datagrid. You need an ArrayCollection that holds all the (newly added) entries from the user plus an empty entry. When you initialize the dataprovider it has to contain the empty entry, otherwise there will not be the possibility to "add" a new entry via the grid because the grid only allows to edit the existing entries. So after the user begins to fill the empty entry, you have to add a new, empty entry to the dataprovider.
精彩评论