Do you know of a good resource that helps creating editable datagrids with Flex? Not with another text field where the user has to edit the text. The editing should happen in-place.
If there is a resource, great! Otherwise we will write up something. We have learnt a lot of things figuring out ways to do this 😉
Could you be more specific as what you are looking for. You certainly saw that the DataGrid is editable. Just set the editable attribute to the grid and the DataColumn you want to edit to true and you have in place text editing. You can also add custom cellRendederers. The Flex documentation describes all this. Note for Flex 1.5 they omitted to define that you may want to set the isCellEditor on the custom cell renderer.
Personally I think inline editing of Flex datagrid is not possible untill…. you enter the power of Flex 2 enterprise server..
Please, prove to me that I am wrong.
Can’t you just use editable=true in your DataGrid?
-James
Well a lot of the cellrenderer examples cover this topic, but the more tips the merrier.
Eg:
http://www.cflex.net/showfiledetails.cfm?ObjectID=108
http://www.cflex.net/showfiledetails.cfm?ObjectID=229
http://www.cflex.net/showfiledetails.cfm?objectID=295
http://members.cox.net/midian/tutorials/combobox.htm
http://www.richinternetapps.com/archives/000072.html
etc…
Actually another topic worth covering is validation. Documentation is fairly sketchy in this arena, things changed from Flex 1 to 1.5, and people go through a lot of trials and tribulations.
Our reference point is Flex 2. Working on the beta now.
We can make the datagrid editable by setting editable = true. But the data does not go back to the backend. As a matter of fact, with bindings in place, sometimes the old value comes back in the cell as soon as you go out.
There is no RDBMSResolver in Flex like Flash. I believe Flex Enterprise Services allow trouble-free datagrid editing and saving back.
We have done something that saves edited data back to the server. It’s not bullet proof, but it works.
So let us gather things around and put up a piece.
Yes, Nirav you have a point here, Flex 2 Enterprise services will work as you had expected.
In This link http://www.richinternetapps.com/archives/000072.html
Does anyone know how to get it to compile for Flex 2?