Relation does not show

4 posts, 0 answers
  1. Steffen
    Steffen avatar
    3 posts
    Member since:
    Jul 2012

    Posted 30 Nov 2012 Link to this post

    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
  2. Plamen
    Admin
    Plamen avatar
    132 posts

    Posted 05 Dec 2012 Link to this post

    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.
  3. Steffen
    Steffen avatar
    3 posts
    Member since:
    Jul 2012

    Posted 06 Dec 2012 Link to this post

    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
  4. Plamen
    Admin
    Plamen avatar
    132 posts

    Posted 06 Dec 2012 Link to this post

    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.
Back to Top