public String GetJsValue(RenderContext context) { if (String.IsNullOrEmpty(GroupBy)) { throw new XamlException("GroupBy property is required"); } var sb = new StringBuilder($"{{prop: '{GroupBy.EncodeJs()}'"); if (Collapsed) { sb.Append(", expanded:").Append((!Collapsed).ToString().ToLowerInvariant()); } if (Count) { sb.Append(", count: true"); } if (!String.IsNullOrEmpty(Title)) { sb.Append($", title: '{Title.EncodeJs()}' "); } sb.Append("}"); return(sb.ToString()); }