How to approach multiple edit pages RRS feed

  • Question

  • User-2013179010 posted

    I've been trying to wrap my head around is to squeeze DD into my organization's more UIcentric workflows. The classic need here is we currently have a system which, although terrible in many respects, has a pretty entrenched UI for customer record updating, which splits the customer's details and related records into three pages - details, status and history. Customers have a bunch of related tables like contacts, tradshow appearances, etc.

    I can model all of this in a CustomPages/Customers/Edit.aspx with a details form (or two, just to make layout nicer) and a bunch of related gridviews for the contacts etc. No problem. However, users don't want to deal with ALL the customer's info on one huge page, and IT doesn't want to have to maintain that either. So i need to split this stuff up.

    - I can't really just link to all of the related DD pages. A customer has say four or five related tables and for a CSR to have to click around to all those individually and add and relate records is way too geeky.

    - Ajax tabs are something of a pain because controls inside tabs cannot declaratively refer to each other (in a DynamicControlParameter for instance). Moreover ever reference in the codebehind has to be like (ControlType)Tab.FindControl("ControlId") which is also a pain. I haven't explored this option beyond these annoyances, it may in fact be more problematic for this control finding reason.

    - I don't want to just create arbitrary pages under my /CustomPages/Customers/ directory, because I don't know how I'd link to them. The DynamicData action enum contains only details, list, edit, insert and listdetails.. I suppose if i could add to this, and figure out how to make DD generate appropriate hyperlinks, this would be an option. But I can't find anythign about that.

     So can anyone help? This is a pretty fundamental problem to solve if I'm going to use DD for anything other than trivial admin sections.

    Monday, September 8, 2008 12:21 PM

All replies

  • User-2013179010 posted

     Update: i've hacked in a temporary solution by adding a DD route for my second edit page. Works fine because I'm only doing this for a single case (for now). Global asax:

     routes.Add(new DynamicDataRoute("DD/{table}/{action}")
                    Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert|ListDetails|Edit2" }),
                    Model = model
      and then in my page I can link to it as usual.
    <asp:hyperlink runat="<span" class="st"><asp:HyperLink runat="server" ID="HyperLink2" Text="Status" 
                NavigateUrl='<%# table.GetActionPath("Edit2", GetDataItem()) %>'></asp:hyperlink>
     This isn't ideal, but it'll work for now since I want to keep generating all my paths in a standard way (with GetActionPath)
    Monday, September 8, 2008 4:46 PM
  • User1641955678 posted

    Note that you can remove the Constraints line altogether if you like.  The only thing you'd lose is that the route would be used for any action string, but that's probably harmless since the DD/ prefix you added already makes the paths fairly unique and unlikely to conflict with unrelated paths.


    Wednesday, September 10, 2008 8:54 PM