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
295 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
[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
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

690 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