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.
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.
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
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
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
is working on a reply...