protected void gvdashboard_RowDataBound(object sender, GridViewRowEventArgs e)
{if (e.Row.RowType == DataControlRowType.DataRow){
DataRowView drv = (DataRowView)e.Row.DataItem;
tmpCategoryName1 = drv[
"Description"].ToString();
if (tbl != null){
TableCell cell = new TableCell();
// Span the row across all of the columns in the Gridview//cell.ColumnSpan = this.GridView1.Columns.Count;cell.ColumnSpan = 10;
// cell.Width = Unit.Percentage(100);cell.Style.Add("font-family", "verdana");cell.Style.Add(
"font-size", "11px");cell.Style.Add(
"font-weight", "bold");cell.Style.Add(
"color", "#FFF");cell.Style.Add(
"background-color", "#5A83C3");cell.Style.Add(
"text-align", "Left");
DataTable)ViewState["Gvdashboard"];
object sumObject;
sumObject = GetCount.Compute(
"Count(Description)", "Description = '" + tmpCategoryName1+ "'");
GetCount.Dispose();
HtmlGenericControl span = new HtmlGenericControl("span");span.InnerHtml = tmpCategoryName1 +
"-(" + sumObject + ")";cell.Controls.Add(span);
row.Cells.Add(cell);
tbl.Rows.AddAt(tbl.Rows.Count - 1, row);
}
}
}
}
No comments:
Post a Comment