This is a migrated thread and some comments may be shown as answers.

May I insert data into detail grid directly in hierarchical grid

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cheng-Chang
Top achievements
Rank 1
Cheng-Chang asked on 09 Apr 2018, 03:52 AM

My scenario is I have an order detail and when purchasing I need to keep every good's expiration and lot number.

 

My screen:

--------------------

top: text area

user enter material number, expiration and lot number  and click add button

--------------------

middle: Grid

master grid -- order detail include material number(key), material name, order quantity.

    detail gird -- expiration, lot number, quantity

 

My problem is how do I find the row that the master grid key and material number that I key in matched? And how do I insert the data into the detail grid instead of manual operation such as select row, expand, and click add button?

1 Answer, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 11 Apr 2018, 10:25 AM
Hi Cheng-Chang,

Generally, every GridTableView has its own datasource and corresponding CRUD operations:
https://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/insert-update-delete-hierarchy/defaultcs.aspx

If you are using the command event handlers of the grid on the code-behind, you can use the GetDataKeyValue method to extract values from the e.Item.OwnerTableView.ParentItem of the detail table view:
https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Cheng-Chang
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or