Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview which is bound to a database and one of the columns is 'Status'.
Status value is initialized as OPEN for all items for the first registration.
how can I update Status column to CLOSE using dropdownlist inside gridview?
Posted

If this is a web project, you did not say so. Either way, the answer is that you use SQL to make the changes you want. If it's a web project, I'd use an AJAX call, passing in the correct id, but both ways, you handle a selection changed event, or the event of a 'commit' button, to run your SQL.
 
Share this answer
 
Comments
snamyna 22-Jul-12 21:01pm    
I try to avoid using AJAX as I have problems with my AJAX which would not work in Master page and I cant solve it until now. I have found the solution for the gridview updating at this link. http://technico.qnownow.com/2012/04/05/use-dropdownlist-in-asp-net-gridview-control/
Christian Graus 22-Jul-12 21:08pm    
I would avoid writing bad code because you can't figure out how to make things work. There is no reason for a master page to break AJAX, esp if you do real AJAX, not use the ASP.NET AJAX library to do it for you.
snamyna 22-Jul-12 22:35pm    
what do u mean by real AJAX?
Christian Graus 22-Jul-12 22:54pm    
AJAX is a standard thing, which has nothing to do with MS. Microsoft's library tries to wrap AJAX to make it easy to use. Those libraries can clash with one another. Just writing AJAX code, using jQuery, will always work.
snamyna 23-Jul-12 1:29am    
Ok..TQ for your info. :)
 
Share this answer
 
Comments
Kenneth Haugland 22-Jul-12 21:24pm    
Why post a question before you research?
snamyna 22-Jul-12 22:36pm    
I havent found it before I post this. I am in hurry to complete my project before the due date. Sorry.
Christian Graus 22-Jul-12 22:54pm    
Why do you have a due date, if you don't know how to do basic web development ? Why accept a project before you know how to do it ?
snamyna 23-Jul-12 1:28am    
This is my first job. Sorry to be too dummy. And I think it is not wrong to ask if I dont know

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900