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
290 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 150 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 350 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

13 Experts available now in Live!

Get 1:1 Help Now