?
Solved

In ASP.NET i have a grid view for which i have used query builder for Select Statement and a Stored Procedure for update statement. But when i try to update the grid view, it doesn't update it

Posted on 2011-02-26
5
Medium Priority
?
298 Views
Last Modified: 2012-05-11
In ASP.NET i have a grid view for which i have used query builder for Select Statement and a Stored Procedure for update statement. But when i try to update the grid view, it doesn't update it in the tables but doesn't even throw any error. It just remains as it is.

I tried with Forms View too, they dont update. The parameters i used in my stored procedure were taken out of the select statement only, no extra paramters used so no errors.

Its really urgent, i would appreciate any help.
0
Comment
Question by:nickladdha
  • 2
  • 2
5 Comments
 
LVL 18

Assisted Solution

by:Jerry Miller
Jerry Miller earned 300 total points
ID: 34990042
Do you have the control that is refreshing the data set to AutoPostBack = True?

http://www.w3schools.com/aspnet/prop_webcontrol_textbox_autopostback.asp

0
 

Author Comment

by:nickladdha
ID: 34990107
What control, its a regular grid view which has all the buttons that come with it. The Edit button and after the edit, you see update and cancel/. Once update is pressed, it postsback and the grid view is seen again but with no change,

Kindly reply.
0
 
LVL 9

Accepted Solution

by:
mayank_joshi earned 700 total points
ID: 34990589
after update be sure to set the datasource  of gridview once again and call the databind method.
0
 

Author Closing Comment

by:nickladdha
ID: 34990980
NOT ACCURATE
0
 
LVL 18

Expert Comment

by:Jerry Miller
ID: 34991722
You would have to have something that is triggering the need to refresh, button click, checkbox, or a data change in a textbox. If the gridview is located inside an update panel and the control value is set to AutoPostBack = True, then it will refresh. Of course you have to set the dataset again in the change event (OnClick, OnChange, AfterUpdate, etc) of that control.
0

Featured Post

Technology Partners: 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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

809 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