Declarative Heirarchy defintion

6 posts, 0 answers
  1. JTango
    JTango avatar
    24 posts
    Member since:
    Jan 2007

    Posted 29 Nov 2008 Link to this post

    Hi guys,

    Are there plans to allow parent/child grid hierarchies to be declared declaratively in XAML in future releases of the DataGrid? If not, this is definitely a feature I would like to request. I would make the construction of child grids much simpler and easier to implement.

    Cheers

    Justin
  2. Nedyalko Nikolov
    Admin
    Nedyalko Nikolov avatar
    871 posts

    Posted 02 Dec 2008 Link to this post

    Hello JTango,

    This functionality has always been on our TODO list.
    This Q we will be making some improvements to the hierarchy feature as a part the of our Silverlight porting effort.
    Of course we will make that available both for WPF and Silverlight.

    Greetings,
    Nedyalko Nikolov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Dogu Tumerdem
    Dogu Tumerdem avatar
    39 posts
    Member since:
    Sep 2006

    Posted 10 Mar 2009 Link to this post

    Is there any way to hide a child view's column declaratively or by code ? our is this a plan too ?
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 12 Mar 2009 Link to this post

    Hello dogu.tumerdem,

    You can set AutoGenerateFieldDescriptors to false for desired GridViewTableDefinition and declare columns programmatically:

                RadGridView1.ItemsSource = ExamplesDB.GetEmployees(); 
     
                TableRelation relation = new TableRelation(); 
                relation.FieldNames.Add(new FieldDescriptorNamePair("EmployeeID""EmployeeID")); 
     
                GridViewTableDefinition definition = new GridViewTableDefinition(); 
                definition.AutoGenerateFieldDescriptors = false
     
                GridViewDataColumn column = new GridViewDataColumn(); 
                column.DataMemberBinding = new Binding("OrderID"); 
                column.HeaderText = "Order ID"
                column.IsFilterable = false
                definition.FieldDescriptors.Add(column); 
     
                column = new GridViewDataColumn(); 
                column.DataMemberBinding = new Binding("OrderDate"); 
                column.DataFormatString = "{0:d}"
                column.HeaderText = "Order Date"
                column.IsFilterable = false
                definition.FieldDescriptors.Add(column); 
     
                definition.DataSource = ExamplesDB.GetOrders(); 
                definition.Relation = relation; 

    All the best,
    Vlad
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Selvam
    Selvam avatar
    7 posts
    Member since:
    Feb 2009

    Posted 30 Apr 2009 Link to this post

    Do you guys have any updates on this feature? I think you had plan to build something for this by Q1...

    I too need this feature badly. I'm trying to follow 100% declarative code for View definition in my project. I got stuck on defining Hierarchial grid using XAML and I don't know whether RadGridView supports this or not?

    Please provide more information on how to define custom column header with Combo Box, Check Box... on the child grid in hierarchy.


  7. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 05 May 2009 Link to this post

    Hi Selvam,

    Refactoring the hierarchy is a big and heavy task and unfortunately we have still some work to do. As you mention it is critical for you to declaratively define hierarchy children settings I would recommend to try the approach stated here. Basically it is a hack to prevent the child grid in hierarchy to automatically build columns and settings and respect the XAML settings. Please have a look at the example in my  post there. Meanwhile we are doing our best to push the improved hierarchy logic to a shippable state.


    Best wishes,
    Pavel Pavlov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for WPF is Visual Studio 2017 Ready