Parent Child Data addition - Forum - Kendo UI Builder by Progress: OpenEdge Edition - Progress Community
 Forum

Parent Child Data addition

This question is not answered

KUIB 1.1  OE11.6.3

I have a grid with a list of open jobs.  I want to select a job and allow the user to enter a qty produced.

Once the user clicks a save button, I want to 

- add a child record showing this production.  

Work order# comes from the parent grid

Qty Made from the user entered data

DateTime Stamp as of now

Record counter to make it unique and in sequence.

- Summarize all the children for a job and update a Total Qty Made field in the parent.  I assume this is best done on the server.

- Refresh the grid of parent details and allow the user to do more data entry.

I can not seem to get the syntax to reference the child record.  Does it need to be bound to something in order for me to access it?

I know that these other tasks will be a challenge until I can see a sample or work out the magic in my head.  I am looking for pointers on web based reference material to help me get up to speed.  Using Telerik or Stack Overflow sites help but there are a lot of variants of how the controls are being used and I have struggled discerning which posts to study.

Thanks,

Bob

All Replies
  • Hello  Bob,

    I would need to know more about your screen design to provide a better answer.

    I am guessing that you are using a Master / Detail type of configuration similar to the one in the following sample:

    oemobiledemo.progress.com/.../

    Source Code: github.com/.../master-detail-grids

    (Or are you using a hierarchical grid configuration?)

    In this design, there is a parent grid (list of open jobs) and 2nd grid to show the children of the selected job.

    Is your data entry happening on the grid itself or on additional fields on a form?

    Is the save button on the form or are you using the edit button on a grid?

    In order to create the records programmatically, you would need to bind to the click event from the right context so that you have access to $scope. For example, you can do this on the onShow event in the view-factory.js file.

    The code on the event handler then can acccess the instance of the Kendo UI DataSource for the child grid and call the add() method and/or sync().

    Example:

    $scope._$ds.CustOrderDetail.add({CustNum: 5, OrderNum: 10000})

    Here are couple of resources that may come up handy:

    demos.telerik.com/.../

    docs.telerik.com/.../datasource

    docs.telerik.com/.../grid

    Please let me know how it goes so I can provide more information.

    I hope this helps,

    Edsel