Login Register

DOJO Grid as a Property Grid

I have been looking through the Grid documentation and examples and it would seem that binding the grid to a data source results in one grid row for each data source row (generally speaking, not including filtering etc.). I want to create a property grid i.e. one grid row for each attribute in a data source row so as you navigate the data source the grid rows change to reflect the attributes of the current row in name/value pairs so the result would be a 2 column grid with the first column representing the name and the second column the value.

I can't see an easy way of doing this apart from programatically generating the property grid by basically iterating through the attributes. This is not so bad for display, but would be a pain if I want to update the original data source with any changes.

Can anyone suggest a better way to do this or am I on my own with maybe adding it to a wishlist?

Some Further info

To further explain what I am trying to do, I have a tree widget attached to a data source which displays a node for each data source record. If the user clicks on a node I would like to display a property Grid showing all the other attributes for the record. The user should be able to click on any node and have the related attributes shown in the Property Grid.

The only way I can think to do this is to programatically create the grid by iterating through the attributes but that means when the attributes are updated in the property grid I have to manually synchronize them back into the data source. Is there an easier way to do this?