Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

OBSOLETE - How to support Master-Detail mode in the Web ListView

$
0
0

=====================
This article is now obsolete. Refer to the solutions described in the ListEditors - Support showing both master and detail records in the same grid control  ticket.
=====================
This example shows the main idea of implementing Master-Detail mode in the grid on the Web using custom grid templates. Take special note that this is not complete solution by any means, and it requires additional R&D and testing. Also, for test purposes all the actions within the detail row are disabled.
I have to warn all the readers that this example is applicable only for a simple scenario when only one details collection is in the class.
The controller that does all the work is quite generic, and it can be used with any class that meets the condition above.
This example may not work in other complex scenarios as complete support of all common scenarios in Master-Detail mode is not a trivial task, and we are not responsible for any possible problems that may appear here.
 

Question Comments

Added By: Krzysztof Krzyzsłof at: 7/11/2012 2:12:25 AM    

Great snippet - thank you!

Added By: Krzysztof Krzyzsłof at: 7/11/2012 5:51:29 AM    

In the below solution Detail Band Captions are empty. I suggest such an improvement:
   
// Instead of this line:
TabPage page = new TabPage(mi.DisplayName);
   
//Do this:
TabPage page = new TabPage(GetCaption(WebApplication.Instance, mi.ListElementType.FullName));
   
(...)
  
public static string GetCaption(XafApplication application, string classFullName)
{
    if (application == null || string.IsNullOrEmpty(classFullName))
        return "";
   
    IModelBOModel boModelNode = application.Model.BOModel;
    if (boModelNode == null)
        return "";
  
    IModelNode classNode = boModelNode.GetNode(classFullName);
    if (classNode == null)
        return "";
  
    return classNode.GetValue<string>("Caption") ?? "";
}

Added By: Salam at: 11/29/2012 10:13:25 PM    

Hello Devexpress,
       I had downloaded this example and tried to run after Converting the project. It rising some errors like

Error     1     'LoginPage.InnerContentPlaceHolder': no suitable method found to override     C:\Users\username\Documents\Samples\eXpressApp Framework\12.2.3\E1512\WebSolution.Web\Login.aspx.cs     30     43     WebSolution.Web

Error     2     'Default.InnerContentPlaceHolder': no suitable method found to override     C:\Users\username\Documents\Samples\eXpressApp Framework\12.2.3\E1512\WebSolution.Web\Default.aspx.cs     36     29     WebSolution.Web

          I am using Windows 8, .Net 4.5, Visual Studio 2012, ExpressApp 12.1.8.0
How can I solve these errors ?

Regards
salam


Viewing all articles
Browse latest Browse all 7205

Trending Articles