- @foreach (var row in s.rows)
+
+ @foreach (var row in sec.rows)
{
renderRow(row, false);
}
@@ -37,25 +37,29 @@
}
-@functions {
+@functions{
- private void renderRow(dynamic row, bool singleColumn)
+ private async Task renderRow(dynamic row, bool singleColumn)
{
@if (singleColumn) {
@:
}
- @foreach ( var area in row.areas ) {
+ @foreach (var area in row.areas)
+ {
- @foreach (var control in area.controls) {
- if (control !=null && control.editor != null && control.editor.view != null ) {
- @Html.Partial("grid/editors/base", (object)control)
+ @foreach (var control in area.controls)
+ {
+ if (control != null && control.editor != null && control.editor.view != null)
+ {
+ @await Html.PartialAsync("grid/editors/base", (object)control)
}
}
-
}
+
+ }
@if (singleColumn) {
@:
@@ -65,23 +69,26 @@
}
+@functions{
-@functions {
public static HtmlString RenderElementAttributes(dynamic contentItem)
{
var attrs = new List
();
JObject cfg = contentItem.config;
- if(cfg != null)
+ if (cfg != null)
+ {
foreach (JProperty property in cfg.Properties())
{
var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString());
attrs.Add(property.Name + "=\"" + propertyValue + "\"");
}
+ }
JObject style = contentItem.styles;
- if (style != null) {
+ if (style != null)
+ {
var cssVals = new List();
foreach (JProperty property in style.Properties())
{