DNN 3.0.8 Multiple Controls and Edit Controls

Last post 04-27-2005 9:13 AM by adyertx. 5 replies.

Sort Posts:

  • DNN 3.0.8 Multiple Controls and Edit Controls

    01-02-2005, 10:47 PM
    • Contributor
      5,220 point Contributor
    • Imsoccrman
    • Member since 03-12-2003, 1:06 PM
    • Tulsa Oklahoma
    • Posts 1,044
    I have made good progress figuring out how to use the Module Actions in conjunction woth the Control Keys to have multiple different controls for manipulating many different objects (tables)

    The problem that I am running into has me stymied...

    Here is the Scenario, I have a Menu.ascx which is the main view control for my module.

    In this Menu, I add 4 different actions for the Edit Role.

    These work as expected and show up for the users if they have edit rights on the module.

    I can use the actions to load the correct control for the object I am trying to manipulate.

    When I try to click the "Edit" link on any of my pages, I am directed to a blank page.

    I figured out that the column for the edit (using contacts as an example) has a link to:
    EditURL(KeyName, KeyValue)

    This directs them to a control that I do not have set up (the default edit control) thus the blank.

    I think... No Problem, i will add the "ControlKey" to the EditURL in the page and all will be well.

    No Combination of this can be made to work correctly from what I can tell. it keeps giving me strange errors (many different ones depending on how I try to change the EditURL)

    Has anyone else made this work yet ?
    Steve Walker
    Senior Consultant
    SharePoint Forums
    SharePoint Architecture
  • Re: DNN 3.0.8 Multiple Controls and Edit Controls

    01-04-2005, 5:57 PM
    • Contributor
      5,220 point Contributor
    • Imsoccrman
    • Member since 03-12-2003, 1:06 PM
    • Tulsa Oklahoma
    • Posts 1,044
    The error that I get in my ascx when I try to change the editURL from this:
    <asp:HyperLink ImageUrl="~/images/edit.gif" NavigateUrl='<%# EditURL("StudentID",DataBinder.Eval(Container.DataItem,"StudentID")) %>' Visible="<%# IsEditable %>" runat="server" />

    to this:
    <asp:HyperLink ImageUrl="~/images/edit.gif" NavigateUrl='<%# EditURL("StudentID",DataBinder.Eval(Container.DataItem,"StudentID"),"Students.Edit") %>' Visible="<%# IsEditable %>" runat="server" />
    is :

    No accessible overloaded 'Students_ascx.EditUrl' can be called with these arguments without a narrowing conversion

    I am assuming that the code cannot determine which of the overloaded functions to call... how do I overcome this when i need to pass in the control key ??
    Steve Walker
    Senior Consultant
    SharePoint Forums
    SharePoint Architecture
  • Re: DNN 3.0.8 Multiple Controls and Edit Controls

    01-15-2005, 11:06 PM
    Locked
    • Member
      65 point Member
    • phanson
    • Member since 07-03-2004, 12:44 PM
    • Posts 13
    Have you found a solution to this yet? I'm encountering the same problem.
  • Re: DNN 3.0.8 Multiple Controls and Edit Controls

    04-21-2005, 9:37 AM
    • Member
      220 point Member
    • adyertx
    • Member since 10-18-2003, 10:33 AM
    • Posts 44

    I'm having the problem as well.  I've saw a related post that suggests using NaviagateURL with a concatenated query string, but this doesn't seem like the best way to do it.  If I attempt to pass the control key to EditURL, I get the error mentioned above.

    I tried looking at some of the core modules to see how they accomplish this, but couldn't find any that use multiple controls.

    Any help will be greatly appreciated.  Thanks in advance!

  • Re: DNN 3.0.8 Multiple Controls and Edit Controls

    04-27-2005, 5:10 AM
    • Member
      11 point Member
    • nigelhughes
    • Member since 04-26-2005, 4:16 PM
    • Posts 7

    Me too!

  • Re: DNN 3.0.8 Multiple Controls and Edit Controls

    04-27-2005, 9:13 AM
    • Member
      220 point Member
    • adyertx
    • Member since 10-18-2003, 10:33 AM
    • Posts 44

    I played around with several different things and eventually got it to work.  While I don't recall exactly what I did, here are a couple things to check:

    • Make sure your Module Definition includes the key you're using (I was changing the keys in my View page without updating the module definition to match the keys being used).
    • Try defining the additional controls as "View" rather than "Edit" so that there is only one Edit control.  I don't think we're limited to a single Edit control, but in my case I only needed one and this seemed to get it working.

    Hope that helps!

Page 1 of 1 (6 items)