PDA

View Full Version : Flipping the paradigm - Columns vs rows in grids



mediamacros
10 Aug 2010, 7:04 AM
I have a project that we are using the grid on and it works great. I got a request from the client that is stumping me a bit. Currently we have a way to create dynamic grids and add rows and in most cases this is intuitive. If I have 5 questions and 50 users answer them, then 5 columns with 50 rows makes great sense for a visual layout.

In another scenario, this does not work so well. We have a questionnaire where have around 50 questions for 3 locations. Since the number of records is low, but the fields are high, a column based data set makes more sense, and this is how we would structure it in Excel.

Is there any way with the grid component to map data this way? The key elements would be...
1. Load the data from JSON or XML so that it maps to columns rather than rows
2. Setting up callbacks on edit of a field to post back the column data, not the row
3. Formatting the editors for each field to look based on the row rules, not the columns.

Is there any option like this or an alternative? My client loves the functionality of the grid, but I don't want to try to recreate it all for a column based model.

Thanks.

-Chuck

arthurakay
10 Aug 2010, 10:34 AM
I don't have an exact answer for you, but it sounds like you're looking for something similar to the PropertyGrid. I would imagine that building a custom extension of that wouldn't be too hard... but I haven't tried it myself to say for sure.

mediamacros
10 Aug 2010, 10:41 AM
Very similar. I just can't seem to find a way to show more than one set of data at a time. Am I missing something obvious?

Thanks.

-Chuck