Gridview disappears when clicking Edit record

I have a drop down list that controls the SelectCommand data of a gridview datasource on SelectedIndexChanged.  The issues is after the data is populated, I select the Edit option for a record, the gridview disappears.  I have tried making it a session variable, but the same thing happens.
  protected void ddlTerm_SelectedIndexChanged(object sender, EventArgs e)
{        
SqlDSApp.SelectCommand = ("SELECT [RFSID], [DID], [DSubmitDate] FROM [Demo] WHERE (DSubmitTerm = '" + ddlTerm.SelectedValue + "')");

            gvRSStudents.DataBind();       
}

Open in new window

Thanks for any help!
javierpdxAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
If a control disappears on post-back, then the problem is usually that you didn't rebind data.
0
 
sammySeltzerCommented:
This code doesn't help because it doesn't relate to the issue you are having.
0
 
javierpdxAuthor Commented:
Thanks.  I appreciate the help.
0
All Courses

From novice to tech pro — start learning today.