More in this section
Forums / Developing with Sitefinity / Assign details view dynamically

Assign details view dynamically

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Sharath
    Sharath avatar
    1 posts
    14 Dec 2011
    26 Dec 2011
    Link to this post
    I am evaluating sitefinity and wanted to know if I could assign different details view dynamically based on some business criterion on the master list view? 

  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    24 Sep 2012
    28 Dec 2011
    Link to this post

     This is not impossible, but would be very difficult to achieve. There is a property in the ContentView, called DetailViewName (there is also a MasterViewName), which can be dynamically changed, but this wouldn't be enough, as the property is persisted in the configurations and the logic that determines which view to load reads the persisted value. So, you will also have to change the logic that loads the different views (Master and detail). However, here comes the problem that the method DetermineCurrentViewName of ContentView is defined as "protected internal virtual" which means that the whole ContentView class would have to be rewritten.

    Svetoslav Petsov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered