• Login
  • Register

DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

DNN Form and List: How to make Custom Data Types

You are not authorized to post a reply.

New Member

New Member

    Basically we want to put a drop down on the form that will likely be populated with an SQL query. With the specific options made available according the the user roles.

    That aside, all the old forums would end with the suggestion to create a "custom data type"; But not how to do that.

    I found a very old example in the Wayback machine. But that no longer works because it is in VB?

    So, is there a modern working example how to create a custom data type? Would that use C#?
    Please help

    New Member

    New Member

      While waiting for an expert to chime in, here is where I am so far.

      I took that old vb sample and cut out nearly all the code so it basically just returned the word "Attachement" and it showed up as an available data type (and that's about it).

      Now I spun off a similar C# version and that just adds my new choice to the avaiable data types. Yeah!

      However I've no clue yet how to add the 'form' part to have it really work.

      In my case want to put a dropdown "Department" list on the form (that I'll populate and filter to only offer departments the user has access to), the list view will simply show the selected department for the record.

      So first/next step; how to I make this thing put a simple drop down list on the form? (I'll work on fancy filtering later)

      If I can get anything acutally working I hope to share a sample here.

      Thanks, CD

      New Member

      New Member

        OK, I'm lost.

        Have "My" CS file in the "App_Code"folder and have tweaked "datatypes.config" & "sharedresources.resx".
        So my new option does show up under available datatypes.

        However My CS file has no code and can't do anything.  And I can't find any recent samples to learn from.
        Can anyone show how to get a simple pulldown to work with this? I mean how do I get My CS file to put a pulldown on the form and save that.




        You are not authorized to post a reply.

        These Forums are dedicated to discussion of DNN Platform.

        For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

        1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
        2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
        3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
        4. No Flaming or Trolling.
        5. No Profanity, Racism, or Prejudice.
        6. Site Moderators have the final word on approving / removing a thread or post or comment.
        7. English language posting only, please.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved