Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Christian Forbes 1 post 71 karma points
    Oct 25, 2014 @ 01:00
    Christian Forbes
    0

    Populate textstring array or datatype grid

    I am fairly new to umbraco but I was wondering if it is possible to populate data into the grid control or textstring array so that everytime a node is created with that property it will have that default information there? Basically looking for a way to create a data type of type grid but with default values (rows) already in the grid when the data type is used on the node.

    Any help is greatly appreciated.

    Christian

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 25, 2014 @ 14:11
    Dennis Aaen
    0

    Hi Christian and welcome to our,

    Perhaps, the U7 Grid Data Type package could be a soultion for you, try to see the http://our.umbraco.org/projects/backoffice-extensions/u7-grid-data-type

    Since you are new to Umbraco I have allowed myself to linked to some documentation on how to install packages into Umbraco, there's multiple ways this can be done. Personally, I always use the install local package option.http://our.umbraco.org/wiki/how-tos/packages-and-projects/how-to-install-a-package

    A good idea is also always try to install the package on a dev environment first to ensure that the package will works as intended with the specific Umbraco version that you are using at the moment instead of just install the package on the live environmentby doing this, you reduce the risk of breaking your live site.

    Hope this helps,

    /Dennis

  • Lee Kelleher 4026 posts 15837 karma points MVP 13x admin c-trib
    Oct 30, 2014 @ 09:09
    Lee Kelleher
    0

    Hi Christian,

    When a new content node is created, you can programmatically hook into it and set the values that you want.

    Take a look at the documentation for Application-Startup, you can then hook into the ContentService.Created event.

    For details on how to programmatically set the data/value for the DataTypeGrid, see this forum topic reply:
    http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/49375-DataType-Grid-integration-C-adding-rows#comment176438

    ... and here's one for Textstring Array:
    http://our.umbraco.org/projects/backoffice-extensions/ucomponents/questionssuggestions/34473-Programmatically-populate-TextString-Array-with-(XML)-data#comment126265


    @Dennis - thanks for the v7 package suggestions!

    Cheers,
    - Lee

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies