Telerik RadGridView and relational dataset

Posted by DWinTX on 06-Feb-2017 12:26

I'm trying to display a ProDataSet defined with several related tables (using DATA-RELATIONs) in a RadGridView.  I want it to display hierarchically.  When the grid loads, the top level table displays correctly, but instead of displaying the related records hierarchically, it lists each table name as column titles on the same line as the primary table fields, as though they were fields as well.  The value in the row for each table shows "Progress.Data.DataSource".

This is the first time I've worked with this grid.  I assumed the ProDataSource would recognize the hierarchy based on the  DATA-RELATION and RELATION-FIELDS definitions defining the dataset.  Is there some other properties or methods on the ProDataSource or RadGridView that I need to set/run to get the hierarchical structure in the grid?

Thanks.

Posted by DWinTX on 09-Feb-2017 14:00

I did hear back from support.  They said that the RadGridView cannot infer relations from the dataset.  They said I would either need to use the UltraGrid, as you mentioned Laura, or write code to read the DS and build the relations at runtime.

All Replies

Posted by Laura Stern on 06-Feb-2017 12:45

No there is no property to set.  Yes, there is a ProgressData.DataSource for each child table that is stored in the schema of the ProBindingSource, as if it were a column.  But there is a protocol via the ITypedList interface, which the BindingSource implements, which when followed will provide the correct information - i.e., the name of the child table and its fields, not the DataSource object itself.  This works with an Infragistics grid.  Apparently this protocol is not being adhered to in the same way with a Telerik RadGridView.  

But I seem to remember that this is a very different way that you would set up a hierarchical grid with Telerik and there should be a KBase about it either through the Telerik or OpenEdge's KBase system (sorry I don't remember!).  You could also contact Tech Support to sort it out.

Posted by DWinTX on 06-Feb-2017 15:33

Thanks Laura,

This may be the article you are referring to:

knowledgebase.progress.com/.../How-to-display-hierarchical-data-in-the-Telerik-Winforms-RadGridView-component-using-the-OpenEdge-ABL

I did see it, but the problem is that I am trying to create an ABL User Control with a grid and a datasource object that our developers can add to their toolbox that will display the grid dynamically based on what dataset they need to display.  This article states that:

"The radGridView also requires that each level of the hierarchy be defined into the Grid at design time, using a separate bindingSource instance for each table in the hierarchy to be displayed in the Grid control. "

so maybe a dynamic grid is not possible with the RadGridView.  I create a support case to ask.  I'll post their response as soon as I get it.

Posted by Laura Stern on 06-Feb-2017 15:45

Yes, that's the one!  Thanks for finding it.

Posted by DWinTX on 09-Feb-2017 14:00

I did hear back from support.  They said that the RadGridView cannot infer relations from the dataset.  They said I would either need to use the UltraGrid, as you mentioned Laura, or write code to read the DS and build the relations at runtime.

This thread is closed