Solved

Gridview disappears when clicking Edit record

Posted on 2014-02-21
3
654 Views
Last Modified: 2014-02-24
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!
0
Comment
Question by:javierpdx
3 Comments
 
LVL 28

Expert Comment

by:sammySeltzer
ID: 39879228
This code doesn't help because it doesn't relate to the issue you are having.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 39880654
If a control disappears on post-back, then the problem is usually that you didn't rebind data.
0
 

Author Closing Comment

by:javierpdx
ID: 39883607
Thanks.  I appreciate the help.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question