Grid: Complex cell content
I've been experimenting with a Grid that has complex objects in the model, e.g. here a record:
{name: "Orange", type: {class: "fruit", color: "orange", description: "bla bla bla"}}
I want this hypothetical 2-column grid to display an editable field with the name, and an editable field with the type (with "description" as tooltip and an icon for the color).
I am puzzled because it seems that everywhere the grid and its model assume that the record's content are strings only (i.e. complex objects are simply "stringified").
What is the best way to approach this problem?
Thank you
Massimo
thank you, it was insightful but unfortunately not the same thing. What I decided to do, is to "flatten the object" and use extra columns (i.e. grid hidden columns) for the complex objects. According to the example above, I will have
{type_class: "fruit", type_color: "orange", type_description: "bla bla bla"}
I just hope the grid's performance won't degradate because of this; I can have potentially up to 120 columns (30 visible, 90 hidden). What do you think?
Thank you
Massimo
thank you, I will implement Jack's suggestion.
Cheers,
Massimo
#If you have any other info about this subject , Please add it free.# |

