One to Many Data Relationship with GridPanels

  1. #1

    One to Many Data Relationship with GridPanels


    I have tried to combine the follwing two examples:

    https://examples1.ext.net/Examples/G...SqlDataSource/
    https://examples1.ext.net/Examples/G...s/One-to-Many/

    I can insert records in the parent table fine. But if I want to insert a record into the child table, I currently have no way of getting the store to pass the foreign key to my function in the code behind when Store.save() is called.

    I am using am OnBeforeRecordInserted event on the Store to do the insert in code behind.

  2. #2

    RE: One to Many Data Relationship with GridPanels

    Hi,

    1. Save to hidden fields before save calling
    2. Use WriteBaseParams of the store
    3. Pass params to the save function


    Grid1.save({ params : { myparam : 'myvalue' } });
  3. #3

    RE: One to Many Data Relationship with GridPanels

    Is it possible to have a sample of what you have described Vladamir? I am keenly interested in this.

    EDIT: What I want to do in particular is store both the parent and the child rows in memory before persisting them to the database. After re-reading your response to the OP, I'm not sure that what you describe would accomplish that. Therefore, I will open a separate thread.


    http://forums.ext.net/showthread.php?threadid=34225-4-1.aspx




Similar Threads

  1. Replies: 0
    Last Post: Dec 12, 2011, 2:38 PM
  2. Refreshing data in GridPanels ?
    By Mohammad in forum 1.x Help
    Replies: 1
    Last Post: Nov 19, 2011, 8:19 AM
  3. Save data from two GridPanels
    By Dominik in forum 1.x Help
    Replies: 15
    Last Post: May 11, 2011, 2:43 PM
  4. Not all GridPanels are resizing
    By chris.salas in forum 1.x Help
    Replies: 0
    Last Post: Jan 25, 2011, 2:10 PM
  5. BUG - tabPanel with 2 gridpanels
    By RPIRES in forum 1.x Help
    Replies: 0
    Last Post: Jul 01, 2010, 6:15 PM

Posting Permissions