/// <summary> /// 清除元素的内容 /// </summary> /// <param name="ELement"></param> public void DelContent(GridElement Element) { if (Element == null) { return; } Cell Cell = ReportSheet.GetCellFromTag(null, Element.Index); Cell.Value = null; Cell.Tag = null; }
/// <summary> /// 清除元素的全部 /// </summary> public void DelElement(GridElement Element) { if (Element == null) { return; } Cell Cell = ReportSheet.GetCellFromTag(null, Element.Index); Cell.BackColor = Color.White; Cell.ForeColor = Color.Black; Cell.Border = null; Cell.Value = null; Cell.Tag = null; }
/// <summary> /// 清除元素的风格 /// </summary> /// <param name="Element"></param> public void DelStyle(GridElement Element) { if (Element == null) { return; } Cell Cell = ReportSheet.GetCellFromTag(null, Element.Index); Cell.BackColor = Color.White; Cell.ForeColor = Color.Black; Cell.Border = null; Element.Style.FormatInfo = null; }
/// <summary> /// 获得某个位置上的报表元素类型 /// </summary> public GridElement GetElement(string Index) { if (string.IsNullOrEmpty(Index)) { return(null); } Cell Cell = ReportSheet.GetCellFromTag(null, Index); GridElement Element = Cell.Value as GridElement; if (Element != null) { Element.Report = ReportSheet; } return(Element); }