We have noticed that using the combination of Umbraco 4.11.4 and uComponents 5.3.2, adding a UrlPicker to a Datagrid is not possible - it is not listed in the dropdown list of available Datatypes.
I can get @subItem.Description, but subItem.Link.urlpicker is not working, because @subItem.Link is a GridCell and it does not have a definition for urlpicker as shown in the log:
-----------------------
2013-02-26 14:57:29,103 [27] WARN umbraco.macro - [Thread 20] Error loading MacroEngine script (file: SLSHomePageHeaderNavigation.cshtml, Type: ''. Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'uComponents.DataTypes.DataTypeGrid.Model.GridCell' does not contain a definition for 'urlpicker'
-----------------------
Anyone knows how to access the urlpicker inside a datatype grid?
Datagrid with Urlpicker
Hi,
I have tried to place the UrlPicker datatype in to the uComponent Datagrid.
But when I try to edit a datagrid row record. The content in the UrlPicker show up empty.
Can i know, how do I retain the data on it?
Thanks
Hello
We have noticed that using the combination of Umbraco 4.11.4 and uComponents 5.3.2, adding a UrlPicker to a Datagrid is not possible - it is not listed in the dropdown list of available Datatypes.
What combination are you using?
Hi,
I am using Umbraco v4.11.4 with uComponents v5.4.
I have a Datagrid with a url-picker and a textstring (description)
I followed the documentation: http://ucomponents.org/data-types/datatype-grid/razor-samples/ to retrieve the values using razor without success.
My code:
Anyone knows how to access the urlpicker inside a datatype grid?
Cheers,
I found a solution, but I'm not sure is the best one:
@foreach (var subItem in item.MainPageNavigationLinks)
{
var link = UrlPickerState.Deserialize(subItem.Link.ToString());
<li>
<a href="@link.Url">
<h4>@link.Title</h4>
<p>@subItem.Description</p>
</a>
</li>
}
You can use the AsDynamicXml() method on the GridCell object to iterate over the data more easily.
is working on a reply...