Solved

Gridview disappears when clicking Edit record

Posted on 2014-02-21
3
622 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now