public override string ToString() { var json = new StringBuilder(); json.Append("groupingView : {"); if (GroupField.IsEmpty()) { throw new ArgumentException("必须为分组设置至少一个列名!"); } json.AppendFormat("groupField:{0},", GroupField.ToJson()); if (!GroupOrder.IsEmpty()) { json.AppendFormat("groupOrder:{0},", GroupOrder.ToJson()); } if (!GroupText.IsEmpty()) { json.AppendFormat("groupText:{0},", GroupText.ToJson()); } if (!GroupColumnShow.IsEmpty()) { json.AppendFormat("groupColumnShow:{0},", GroupColumnShow.ToJson()); } if (!GroupSummary.IsEmpty()) { json.AppendFormat("groupSummary:{0},", GroupSummary.ToJson()); } if (HideFirstGroupCol) { json.Append("groupSummary:true,"); } if (ShowSummaryOnHide) { json.Append("showSummaryOnHide:true,"); } if (!Plusicon.IsEmpty()) { json.AppendFormat("plusicon:'{0}',", Plusicon); } if (!Minusicon.IsEmpty()) { json.AppendFormat("minusicon:'{0}',", Minusicon); } if (!IsInTheSameGroup.IsEmpty()) { json.AppendFormat("isInTheSameGroup:{0},", Regex.Replace(IsInTheSameGroup.ToJson(), "'\"", "")); } if (!FormatDisplayField.IsEmpty()) { json.AppendFormat("formatDisplayField:{0},", Regex.Replace(FormatDisplayField.ToJson(), "'\"", "")); } json.Append("}"); return(json.ToString()); }