If you navigate to the page and run through the process manually the query returns data and you can also update the data in the grid. However, if you navigate to the page using a URL containing query string parms the select query runs and dumps data into the grid just fine and even allows you to update.. it just doesn't actually update anything when committing changes to the grid. Below is every bit of my code behind for said page.. what am I not seeing/doing here?
protected void Page_Load(object sender, EventArgs e)
{
string qsFILENO = Request.QueryString["FN"];
string qsTYPE = Request.QueryString["T"];
if (qsFILENO != null && qsTYPE != null)
{
txtActNum.Text = qsFILENO;
ddlTableName.ClearSelection();
ddlTableName.Items.FindByValue(qsTYPE).Selected = true;
btnSubmit_Click(null, null);
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
string table = ddlTableName.SelectedValue;
GridView1.DataSource = null;
GridView1.DataBind();
GridView2.DataSource = null;
GridView2.DataBind();
switch (table)
{
case "tecB":
GridView1.DataSourceID = "tecBDataSource";
GridView1.DataBind();
GridView1.Visible = true;
GridView2.Visible = false;
break;
case "tecP":
GridView2.DataSourceID = "tecPDataSource";
GridView2.DataBind();
GridView2.Visible = true;
GridView1.Visible = false;
break;
}
}

New Topic/Question
Reply



MultiQuote




|