Gridview does not binding Values.
Hi friends,i m developing attendance percentage module for student..herewith i have developed the grid view to bind the percentage manually...i have written the code but it goes not bind..can anyone correct my code...here with i had attached the sample...

Sanjeeb LenkaPosted Oct 8, 2013, 2:41 AM
public void gvbind()
{
if (Session["Tab"] == null)
{
DataTable table = new DataTable();
table.Columns.Add("Tatalworkingdays");
table.Columns.Add("Present");
table.Columns.Add("Absent");
table.Columns.Add("Percentage");
DataRow Dr = table.NewRow();
Dr["Tatalworkingdays"] = Label16.Text;
Dr["Present"] = Label17.Text;
Dr["Absent"] = Label18.Text;
Dr["Percentage"] = Label19.Text;
table.Rows.Add(Dr);
this.GridView1.DataSource = table;
GridView1.DataBind();
}
else
{
this.GridView1.DataSource = Session["Tab"] as DataTable;
GridView1.DataBind();
}
}
selva kumarPosted Oct 8, 2013, 2:47 AM