1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Assign details view dynamically

Assign details view dynamically

2 posts, 0 answered
  1. Sharath
    Sharath avatar
    1 posts
    Registered:
    14 Dec 2011
    26 Dec 2011
    Link to this post
    Hi,
    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? 

    Thanks,
    Sharath
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    28 Dec 2011
    Link to this post
    Hi,

     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.

    Regards,
    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