I am using a gridview to display a table queried from a database...
In this gridview I also added a buttonfield, and 3 template fields...
When i press the buttonfield the data from the database is acquired, but the manual data inserted from the template fields are not.. It seems that null values are acquired.
From the xml file i am firing the following event:
OnRowCommand="GridView1_SelectedIndexChanged1"
and have the following method to catch that event:
protected void GridView1_SelectedIndexChanged1(object sender, GridViewCommandEventArgs e)
{
int x = Convert.ToInt32(e.CommandArgument);
GridView1.SelectRow(x);
GridViewRow row = GridView1.Rows[x];
Response.Write(row.Cells[0].Text + "\t");
Response.Write(row.Cells[1].Text + "\t");
Response.Write(row.Cells[2].Text + "\t");
Response.Write(row.Cells[3].Text + "\t");
Response.Write(row.Cells[4].Text + "\t");
Response.Write(row.Cells[5].Text + "\t");
Response.Write(row.Cells[6].Text + "\t");
Response.Write(row.Cells[7].Text + "\t");
Response.Write(row.Cells[8].Text + "\t");
}
Any ideas on how i can get the values from that template field? do i need to catch another event rather than GridViewCommandEventArgs? If so what event should i throw from the xml part?
Thanks,