/// <summary> /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. /// </summary> /// <returns> /// A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than <paramref name="obj"/>. Zero This instance is equal to <paramref name="obj"/>. Greater than zero This instance is greater than <paramref name="obj"/>. /// </returns> /// <param name="obj">An object to compare with this instance. </param><exception cref="T:System.ArgumentException"><paramref name="obj"/> is not the same type as this instance. </exception><filterpriority>2</filterpriority> public int CompareTo(object obj) { EMGridColumn o = obj as EMGridColumn; if (o == null) { return(0); } if (VisibleIndex < o.VisibleIndex) { return(-1); } else if (o.VisibleIndex == VisibleIndex) { return(0); } return(1); }
/// <summary> /// 拷贝 /// </summary> /// <param name="column">数据列</param> public void CopyTo(ref EMGridColumn column) { column.SourceName = SourceName; column.Caption = Caption; column.Visible = Visible; column._orderBy = _orderBy; column.IsAsc = IsAsc; column.FormatString = FormatString; column.ResponseFilter = ResponseFilter; column.ResponseColumnFilter = ResponseColumnFilter; column.ResponseFilterName = ResponseFilterName; column.ResponseNative = ResponseNative; column.ResponseColumnNative = ResponseColumnNative; column.ResponseFilterNativeName = ResponseFilterNativeName; column.ShowControl = ShowControl; column.ControlValues = ControlValues; column.BlnRowGroup = BlnRowGroup; column.BlnRowKey = BlnRowKey; column.BlnColumnRank = BlnColumnRank; column.IsBigText = IsBigText; column.VisibleIndex = VisibleIndex; column.IsFields = IsFields; column.IsGroup = IsGroup; column.ColType = ColType; column.Width = Width; column.IsWeb = IsWeb; column.BrowseWay = BrowseWay; column.WebColShowCaption = WebColShowCaption; column.CaptionFilterName = CaptionFilterName; column.CaptionFormat = CaptionFormat; column.BandCaptionFilterName = BandCaptionFilterName; column.BandCaptionFormat = BandCaptionFormat; column.Total = Total; column.TotalCaption = TotalCaption; column.Postion = Postion; column.BindingDynamicName = BindingDynamicName; column.StrStarName = StrStarName; column.SaveUrlColumnName = SaveUrlColumnName; column.StrCaptionExpress = StrCaptionExpress; column.BindFilterKey = BindFilterKey; // column.BlnRowToColSendToChart = BlnRowToColSendToChart; }
/// <summary> /// 数据列克隆 /// </summary> /// <param name="gridColumn"></param> /// <returns></returns> public static EMGridColumn Clone(EMGridColumn gridColumn) { return((EMGridColumn)gridColumn.Clone()); }
/// <summary> /// 克隆对象 /// </summary> /// <returns></returns> public object Clone() { EMGridColumn column = new EMGridColumn { UrlCaptionCol = this.UrlCaptionCol, UrlShowName = this.UrlShowName, Name = this.Name, BandName = this.BandName, SourceName = this.SourceName, Caption = this.Caption, Visible = this.Visible, _orderBy = this._orderBy, IsAsc = this.IsAsc, FormatString = this.FormatString, ResponseFilter = this.ResponseFilter, ResponseColumnFilter = this.ResponseColumnFilter, ResponseFilterName = this.ResponseFilterName, ResponseNative = this.ResponseNative, ResponseColumnNative = this.ResponseColumnNative, ResponseFilterNativeName = this.ResponseFilterNativeName, ShowControl = this.ShowControl, ControlValues = this.ControlValues, BlnRowGroup = this.BlnRowGroup, BlnRowKey = this.BlnRowKey, BlnColumnRank = this.BlnColumnRank, IsBigText = this.IsBigText, VisibleIndex = this.VisibleIndex, IsFields = this.IsFields, IsGroup = this.IsGroup, ColType = this.ColType, Width = this.Width, IsWeb = this.IsWeb, BrowseWay = this.BrowseWay, WebColShowCaption = this.WebColShowCaption, SaveUrlColumnName = this.SaveUrlColumnName, CaptionFilterName = this.CaptionFilterName, CaptionFormat = this.CaptionFormat, BandCaptionFilterName = this.BandCaptionFilterName, BandCaptionFormat = this.BandCaptionFormat, Total = this.Total, TotalCaption = this.TotalCaption, Postion = this.Postion, BindingDynamicName = this.BindingDynamicName, FilterDateValueFormat = this.FilterDateValueFormat, StrStarName = this.StrStarName, StrCaptionExpress = this.StrCaptionExpress, BindFilterKey = this.BindFilterKey // ,BlnRowToColSendToChart = this.BlnRowToColSendToChart }; if (CustomDate != null) { column.CustomDate = new CustomDate() { BindDateType = this.CustomDate.BindDateType, CalType = this.CustomDate.CalType, DateTime = this.CustomDate.DateTime, Value = this.CustomDate.Value }; } return(column); }