public override string ToString() { StringBuilder strRet = new StringBuilder(); strRet.Append("_emptyField: ''"); if (DataType != string.Empty) { strRet.AppendFormat(", datatype:'{0}'", DataType); } if (GridType != null) { strRet.AppendFormat(", GridType:'{0}'", GridType.ToString()); } if (URL != string.Empty) { strRet.AppendFormat(", url:'{0}'", URL); } if (MType != string.Empty) { strRet.AppendFormat(", mtype:'{0}'", MType.Trim()); } if (Height != null) { strRet.AppendFormat(", height:'{0}'", Height.ToString()); } if (Sortable != string.Empty) { strRet.AppendFormat(", sortable:'{0}'", Sortable); } if (Width != null) { strRet.AppendFormat(", width:'{0}'", Width); } if (IsDynamic != null) { strRet.AppendFormat(", isdynamic:{0}", (bool)IsDynamic ? "true" : "false"); } if (IsMultiSelect != null) { strRet.AppendFormat(", multiselect:{0}", (bool)IsMultiSelect ? "true" : "false"); } if (Caption != string.Empty) { strRet.AppendFormat(", caption:'{0}'", Caption); } if (ForceFit != string.Empty) { strRet.AppendFormat(", forceFit:'{0}'", ForceFit); } if (RowNum != null) { strRet.AppendFormat(", rowNum:{0}", RowNum); } if (RowNumber != null) { strRet.AppendFormat(", rownumbers:{0}", (bool)RowNumber ? "true" : "false"); } if (RowNumWidth != string.Empty) { strRet.AppendFormat(", rownumWidth:{0}", RowNumWidth); } if (SubGrid != null) { strRet.AppendFormat(", subGrid:{0}", (bool)RowNumber ? "true" : "false"); } if (FooterSummary != null) { strRet.AppendFormat(", footerSummary:{0}", (bool)FooterSummary ? "true" : "false"); } // column != 0 => fixed column if (FixedColumn != 0) { strRet.AppendFormat(", fixedcolumn:{0}", FixedColumn); } strRet.AppendFormat(", allowEdit:{0}", AllowEdit ? "true" : "false"); strRet.AppendFormat(", allowDelete:{0}", AllowDelete ? "true" : "false"); strRet.AppendFormat(", allowAddRow:{0}", AllowAddRow ? "true" : "false"); strRet.AppendFormat(", numberEmptyRow:{0}", NumberEmptyRow); if (AdditionAttribute != string.Empty && AdditionAttribute != null) { string[] arr = AdditionAttribute.Split(','); if (arr.Length > 0) { for (int i = 0; i < arr.Length; i++) { strRet.AppendFormat(", {0}: {1}", arr[i].Split(':')[0], arr[i].Split(':')[1]); } } } return(strRet.ToString()); }
public override string ToString() { StringBuilder strRet = new StringBuilder(); strRet.Append("{"); //ZOrder int if (ZOrder != null) { strRet.AppendFormat("order:{0}", ZOrder.ToString()); } //Heading string if (Name != string.Empty) { strRet.AppendFormat(", name:'{0}'", Name); //strRet.AppendFormat(", index:'{0}'", ZOrder.ToString()); strRet.AppendFormat(", index:'{0}'", DataMappingName); } //DataType if (DataType != string.Empty) { strRet.AppendFormat(", sorttype:'{0}'", DataType); } //DataAlign if (DataAlign != string.Empty) { strRet.AppendFormat(", align:'{0}'", DataAlign); } //width if (Width != null) { strRet.AppendFormat(", width:{0}", Width.ToString()); } //IsSortable if (Sortable != null) { strRet.AppendFormat(", sortable:{0}", (bool)Sortable ? "true" : "false"); } //IsEditable if (IsEditable != null) { strRet.AppendFormat(", editable:{0}", (bool)IsEditable ? "true" : "false"); } //EditOptions if (EditOptions != string.Empty) { strRet.AppendFormat(", editoptions:{0}", EditOptions); } //FreezeIndex int if (Index != string.Empty) { strRet.AppendFormat(", index:'{0}'", Index); } //FreezeIndex int if (IsHidden != null) { strRet.AppendFormat(", hidden:{0}", IsHidden.ToString().ToLower()); } if (Format != string.Empty) { strRet.AppendFormat(", formatter: {0}", Format); strRet.AppendFormat(", sformatter: '{0}'", Format); } if (Resizable != null) { strRet.AppendFormat(", resizable:{0}", Resizable.ToString().ToLower()); } if (Classes != string.Empty) { strRet.AppendFormat(", classes: '{0}'", Classes); } if (IsDynamic != null) { strRet.AppendFormat(", isdynamic:{0}", (bool)IsDynamic ? "true" : "false"); } if (Frozen != null) { strRet.AppendFormat(", frozen:{0}", (bool)Frozen ? "true" : "false"); } if (SummaryType != string.Empty) { if (SummaryType.Contains("fn:")) { strRet.AppendFormat(", summaryType: {0}", SummaryType.Replace("fn:", "")); } else { strRet.AppendFormat(", summaryType: '{0}'", SummaryType); } } if (SummaryTemplate != string.Empty) { strRet.AppendFormat(", summaryTpl: '{0}'", SummaryTemplate); } if (ConditionStyleName != string.Empty) { strRet.AppendFormat(", ConditionStyleName: '{0}'", ConditionStyleName); } if (FontItalic != null) { strRet.AppendFormat(", FontItalic:{0}", (bool)FontItalic ? "true" : "false"); } if (FontBold != null) { strRet.AppendFormat(", FontBold:{0}", (bool)FontBold ? "true" : "false"); } if (FontColor != string.Empty) { strRet.AppendFormat(", FontColor: '{0}'", FontColor); } if (BackColor != string.Empty) { strRet.AppendFormat(", BackColor: '{0}'", BackColor); } if (iCSS != string.Empty) { strRet.AppendFormat(", iCSS: '{0}'", iCSS); } if (AdditionAttribute != string.Empty && AdditionAttribute != null) { string[] arr = AdditionAttribute.Split(','); if (arr.Length > 0) { for (int i = 0; i < arr.Length; i++) { strRet.AppendFormat(", {0}: {1}", arr[i].Split(':')[0], arr[i].Split(':')[1]); } } } strRet.Append("}"); return(strRet.ToString()); }