i have a gridview table like this...
<div>
<asp:GridView ID="GridView1" runat="server"
AllowSorting="true"
OnSorting="TaskGridView_Sorting" >
</asp:GridView>
</div>
i am populating the gridview with 2 arraylists like following
DataTable taskTable = new DataTable("TaskList");
taskTable.Columns.Add("File Name");
taskTable.Columns.Add("Failure Count");
for (int i = 0; i < namesOfFiles.Count; i++)
{
DataRow tableRow = taskTable.NewRow();
tableRow["File Name"] = namesOfFiles[i];
tableRow["Failure Count"] = buFailureCount[i];
taskTable.Rows.Add(tableRow);
}
Session["TaskTable"] = taskTable;
GridView1.DataSource = Session["TaskTable"];
GridView1.DataBind();
so now when i run this i dont see anything on the screen unless i put the autogenerate column property as true....
is there a way i can get template fields coz i know many ways to modify data in gridview then, or a way for these columns to be aligned in my code behind.. as now the header and the items are stuck on the left margin...
thanks