///<summary>Creates a cell for a row ///</summary> ///<param name="cellId">Cell identifier</param> ///<param name="row">Row this cell belongs to</param> ///<param name="value">value for this cell</param> public RowCell(string cellId, Row row, object value) { CellId = cellId; m_row = row; _gotPostBackData = false; Value = value; }
///<summary>Creates a cell for a row ///</summary> ///<param name="cellId">Cell identifier</param> ///<param name="row">Row this cell belongs to</param> public RowCell(string cellId, Row row) { CellId = cellId; m_row = row; _gotPostBackData = false; }
internal string GetEventData(string columnName, string RowId, Row row) { if (BeforeToolTipRender != null) { BeforeToolTipRenderEventHandlerArgs ea = new BeforeToolTipRenderEventHandlerArgs { EditIndex = RowId, ColumnName = columnName, Row = row }; try { BeforeToolTipRender(this, ea); return ea.ReturnData; } catch (Exception ee) { return Grid.Debug ? string.Format("Error in 'BeforeToolTipRender' Column: {1}, RowId: {2}<br/><b>Error description</b><br/><br/>:{0}", ee, columnName, RowId) : "Server-error loading. Use debug for more information."; } } return "null"; }
public void RenderGridWithRows() { Grid grid = new Grid(); grid.ID = "test"; Row newrow = new Row( grid.MasterTable); newrow["title"].Value = "title 1"; newrow["Description"].Value = @"description 1"; newrow["sampleurl"].Value = "sample url 1"; newrow["PrimaryColumn"].Value = "1"; grid.AddRow(newrow); newrow = new Row( grid.MasterTable); newrow["title"].Value = "title 2"; newrow["Description"].Value = @"description 2"; newrow["sampleurl"].Value = "sample url 2"; newrow["PrimaryColumn"].Value = "2"; grid.AddRow(newrow); newrow = new Row( grid.MasterTable); newrow["title"].Value = "title 3"; newrow["Description"].Value = @"description 3"; newrow["sampleurl"].Value = "sample url 3"; newrow["PrimaryColumn"].Value = "3"; grid.AddRow(newrow); StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter gridwriter = new HtmlTextWriter(sw); grid.RenderControl(gridwriter); }
internal bool ShouldRender(Row row) { switch (SystemColumnType) { case Enums.SystemColumn.DeleteColumn: if (row.AllowDelete == false) return false; break; case Enums.SystemColumn.CopyColumn: if (row.AllowCopy == false) return false; break; case Enums.SystemColumn.UpdateGridRecordsColumn: if (Grid.AllowUpdate == false) return false; break; } return true; }