Get data from Skybrud.Umbraco.GridData in controller
Hi
I'm using GridData for the layout in the backoffice, but I do not want to @Html.GetGridHtml to display the HTML in the UI, I want to use a strong viewmodel.
I have getting so far with my code, but I cannot get the values from the json in my controller.
Can any help, my code is below.
foreach (GridSection section in grid.Sections)
{
foreach (GridRow row in section.Rows)
{
foreach (GridArea area in row.Areas)
{
foreach (GridControl control in area.Controls)
{
switch (control.Editor.Alias.ToLower())
{
case "headlineh1":
bool hi = control.JObject.First.HasValues;
if (hi)
{
//Need to get value for headline1 here
//JToken test = control.JObject.Value<string>();
//var test = JsonConvert.DeserializeObject(control.JObject.ToString());
//string test1 =
}
break;
}
}
}
}
}
Get data from Skybrud.Umbraco.GridData in controller
Hi
I'm using GridData for the layout in the backoffice, but I do not want to @Html.GetGridHtml to display the HTML in the UI, I want to use a strong viewmodel.
I have getting so far with my code, but I cannot get the values from the json in my controller.
Can any help, my code is below.
is working on a reply...