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

Relation does not show

3 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steffen
Top achievements
Rank 1
Steffen asked on 30 Nov 2012, 10:36 AM
Hello,

I try to create a relation between the MasterTemplate and a ChildTemplate.

The DataSources for the templates have to be filled manually, due they come from different sources (REST and .Net-Remoting).

After fill in the data, I create a relation between them

var relation = new GridViewRelation(_StockGridView.MasterTemplate);
relation.ChildTemplate = _PartsTemplate;
relation.RelationName = "PartToArticleCode";
relation.ParentColumnNames.Add("ID");
relation.ChildColumnNames.Add("ArticleCodeID");
this._StockGridView.Relations.Add(relation);

Unfortunatly... this does not work (anymore!). It worked the first time I created the form etc., but after I've added a control to a container to the form (not to the grid), the gridview refuses to show the hierarchy anymore.

Maybe someone got a clue... I haven't :(

Regards,
Steffen

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 05 Dec 2012, 09:55 AM
Hi Steffen,

Thank you for writing.

Setting the hierarchical grid in unbound mode is quite similar to that for the bound mode with only difference is setting the unbound mode itself. First of all you need to create and the columns you need. After that set up the relation and finally load the data.

Read the documentation article about "Unbound Mode" and more specific "Hierarchical Grid in Unbound mode" section: http://www.telerik.com/help/winforms/gridview-populating-with-data-unbound-mode.html.

If you continue experiencing issues, please get back to me with a sample application demonstrating the undesired application and I will look into it for you.

I hope that you find this information useful. If you have any other questions, feel free to write back.

Greetings,
Plamen
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Steffen
Top achievements
Rank 1
answered on 06 Dec 2012, 07:12 AM
Hi Plamen,

Thanks for your reply. And the information is very helpful, it solved the problem.

After I've done a simple project to pinpoint the problem, it became very clear :)

Greetings,
Steffen
0
Plamen
Telerik team
answered on 06 Dec 2012, 04:10 PM
Hi Steffen,

I am glad that the issue you were facing is now resolved.

It was a pleasure for me to assist you. Please do not hesitate to contact us if you have any additional questions.

Greetings,
Plamen
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Tags
GridView
Asked by
Steffen
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Steffen
Top achievements
Rank 1
Share this question
or