This is a migrated thread and some comments may be shown as answers.
Get ID of parent (FK) on Create
1 Answer 10 Views
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Michael asked on 24 Mar 2020, 12:57 PM

Hey everyone!

 

I'm currently focusing a lot on creating components and pages with the help of Telerik Blazor UI. 

One problem/question that poped-up recently is the following : 

Let's say I have a Multi-Hierarchy grid reprensenting Orders with a list of Products for each. If i'm adding a product using a grid command column, how do i manage to get the ID of the Order under which the product was added?

Thanks in advance and stay safe!

1 Answer, 1 is accepted

Sort by
0
Accepted
Svetoslav Dimitrov
Telerik team
answered on 24 Mar 2020, 01:49 PM

Hello Michael,

In our Knowledge Base portal we have an article on performing CRUD operations in Hierarchy Grid (link: https://docs.telerik.com/blazor-ui/knowledge-base/grid-edit-in-hierarchy). 

In this article you can see a working example of Creating, Reading, Updating and Deleting data in nested Grids and also accessing the parent model (in your case an Order) from the nested Grid (Products) by using the context and passing it to a Handler.

    Regards,
    Svetoslav Dimitrov
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
    Tags
    Grid
    Asked by
    Michael
    Top achievements
    Rank 2
    Answers by
    Svetoslav Dimitrov
    Telerik team
    Share this question
    or