Setting RowDetailsTemplate programmatically

2 posts, 0 answers
  1. Tolga
    Tolga avatar
    28 posts
    Member since:
    Jun 2007

    Posted 20 Sep 2010 Link to this post


    I'd like to set/build the RadGridView's RowDetailsTemplate programmatically. Here is some code but I get an error message

    "DependencyProperty Telerik.Windows.Controls.GridView.GridViewDataControl. RowDetailsTemplate cannot be set on an object of type System.Windows.DataTemplate."

    detailsViewTemplate =


    new DataTemplate();


    detailsView =


    new SearchDetails();


    detailsView.DataContext =






    RadGridView.RowDetailsTemplateProperty, detailsView);   //ERRORS out




    this.GridView.RowDetailsTemplate = detailsViewTemplate;




  2. Vlad
    Vlad avatar
    11100 posts

    Posted 21 Sep 2010 Link to this post


    With this code you are trying to set value for RadGridView.RowDetailsTemplateProperty property on System.Windows.DataTemplate and since there is no such property you got the error. 

    Sincerely yours,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top