[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Can gridview retain it's data after postback

Posted on 2014-02-26
5
Medium Priority
?
276 Views
Last Modified: 2014-03-25
This question is based on http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_28373722.html

I press a button to populate a gridview.  When I press the button again with different parameters, I want the new results to be added as an extra row to the gridview.  I don't want the new results to replace the old.

The gridview is populated by passing parameters to a stored procedure.  Obviously only one set of parameters can be passed at a time.

I'm using vb2008 with asp.net 3.5
0
Comment
Question by:AlHal2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39892390
What are you using for the data source for the GridView?  If you are using something like the SqlDataSource, then it gets to be challenging.  If you are binding to a list structure or DataTable, then it should be easier.
0
 

Author Comment

by:AlHal2
ID: 39893147
I think I've solved the problem.
I've had a table created which will store the data that gets sent to the gridview.  The stored procedure updates the table and then runs a select query which is sent to the gridview.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39893304
What are you doing with the table when the page posts back?
0
 

Accepted Solution

by:
AlHal2 earned 0 total points
ID: 39894277
I've incorporated JamesBurger's solution to http://www.experts-exchange.com/Programming/Languages/.NET/Q_28375965.html

The stored procedure does what's necessary then displays the updated table.
That seems to work.
On the other post you talke about some database operations being synchronous, but not all.  Please could you elaborate?
0
 

Author Closing Comment

by:AlHal2
ID: 39952688
It works.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

656 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