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

How to associate table and query with MasterTableView and DetailTables?

1 Answer 5 Views
Documentation and Tutorials
This is a migrated thread and some comments may be shown as answers.
Bianca
Top achievements
Rank 1
Bianca asked on 25 Sep 2019, 07:31 PM

I need some help. I have a table of type MasterTableView, along with DetailTables, however I do not know how to connect these components to a table or database query.

I attached two images, one represents the system as it is presented today, and the other image shows how it should look.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 Sep 2019, 10:09 AM

Hello Bianca,

 

Generally, when building a grid hierarchy, you can use SessionParameters to make a correlation between the levels:
https://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarative-relations/defaultcs.aspx

This can also happen using programmatic binding:
https://demos.telerik.com/aspnet-ajax/grid/examples/data-binding/programmatic-hierarchy/defaultcs.aspx

The important thing with programmatic binding is that there are not defined ParentTableRelations and you should use the dedicated grid events for binding the grid, and not the DataBind() method:
https://www.telerik.com/support/kb/aspnet-ajax/grid/details/how-to-bind-radgrid-properly-on-server-side

I noticed that in the detail structure you won't have another table, but rather custom controls. In this case, it would be more suitable to use the Hierarchy with Templates approach:
https://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/hierarchy-with-templates/defaultcs.aspx

I hope this will prove helpful. Let me know if I can assist with anything else.

 

Regards,
Eyup
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Documentation and Tutorials
Asked by
Bianca
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or