Posted by: edsyrett | 18 February 2009

New line in DataGrid, using XML

Alex Harui has a post here about having a dummy line at the bottom of a DataGrid that the user could tab to or click on to add a new line.  Alex’s version uses arrays of objects.  However, we use a lot of XML in our projects, and whilst we could actually make it work with an XMLList, I set about trying to do it properly with an XMLListAdapter, which is the XML equivalent of the ArrayCollection.  I think I managed it, but it was difficult because I ran in to a couple of issues with DataGrid and the XMLListAdapter itself.  I couldn’t get the grid to work properly without these changes.  

My test app is here.  As usual you can right-click and select “view source”.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: