Fill grid from a record (save 1:n in a store's row)
I have a main-grid and a form. When the users selects a row in the main-grid, the values are displayed in a form and can be edited.
First I loaded the form from the server every time the user selected a new row. But because it's just faster, I now load the whole data into the store of the main-grid and then fill-in the form from the data of the store without connecting the server again - which works fine.
Lets say we have a list of customers in the grid:
Name, Forename, Street, City...
Meyers, Bob, ...
Hope, Alice, ...
Now I want to add telephone-numbers to that. The problem is: There sould be unlimited telephone-numbers possible per customer and there should be a type (normal, mobile, fax...) to each number.
In my database, this is of course another table with a 1:n-correlation to the customer table, like: customer, number, type.
In my GUI, this will be an editable grid on the form showing the number and the type.
Here comes my problem: How do I store this in the main-grid's store to avoid another server-access when the user selects a row? I can fill in text-fields and so on from a record, but there seem to be no way to store the array of telephone-numbers in a record.
Thanks for your reply. Which example did you mean? I only found Ext.ux.grid.RecordForm, which does the grid-form-editing, but I dod get this to work as well. My problem is to store a grid inside the other grid's store which I couldn't find covered up here.