Delete Gridview Row using Ajax in VS 2008
-
Hi, I am very new to VS 2008. I understand that .NET have the following functionality build in, but I cant seem to find information specific to my problem. My problem: I am trying to Delete a row in a Gridview. If the user select the delete button in the row it wants to delete a message must pop up to ask the user if he/she is sure they want to delete the row. If the user clicks yes, the row must be deleted. I understand this must be done in AJAX. I am trying to find information on how I must go about it. Can anyone please direct me on how I will do this? Your help will be greatly appreciated. Kind Regards, Elizma
-
Hi, I am very new to VS 2008. I understand that .NET have the following functionality build in, but I cant seem to find information specific to my problem. My problem: I am trying to Delete a row in a Gridview. If the user select the delete button in the row it wants to delete a message must pop up to ask the user if he/she is sure they want to delete the row. If the user clicks yes, the row must be deleted. I understand this must be done in AJAX. I am trying to find information on how I must go about it. Can anyone please direct me on how I will do this? Your help will be greatly appreciated. Kind Regards, Elizma
Elizma wrote:
I am trying to Delete a row in a Gridview. If the user select the delete button in the row it wants to delete a message must pop up to ask the user if he/she is sure they want to delete the row.
For this use a make a javascript function in which use a confirm box if it returns true then delete the row else not.Register this javascript function to every row at rowdatabound function.For deleting the row from the gridview check the link below. Deleting row from gridview[^] You can also check this link for your whole solution Deleting giridview row with confirmation[^]
Cheers!! Brij
-
Hi, I am very new to VS 2008. I understand that .NET have the following functionality build in, but I cant seem to find information specific to my problem. My problem: I am trying to Delete a row in a Gridview. If the user select the delete button in the row it wants to delete a message must pop up to ask the user if he/she is sure they want to delete the row. If the user clicks yes, the row must be deleted. I understand this must be done in AJAX. I am trying to find information on how I must go about it. Can anyone please direct me on how I will do this? Your help will be greatly appreciated. Kind Regards, Elizma
Elizma wrote:
I understand this must be done in AJAX
You can do this without using AJAX concepts also. Handle the particular event and rebind the grid after deletion. If you need to do with AJAX, you can work with XmlHttpRequest and response objects which allows to send request to server pages in AJAX fashion. Easy alternative for implementing AJAX in ASP.NET is to use ASP.NET AJAX extensions. Download the AJAX toolkit and work with the controls provided in it.
Elizma wrote:
ask the user if he/she is sure they want to delete the row
Assuming you will use AJAX toolkit, there is a
ModalPopup
control available. Use that to get confirmation from user. The Grdiview has to be placed in anUpdatePanel
control so that it will be updated without a page refresh.Navaneeth How to use google | Ask smart questions
-
Elizma wrote:
I am trying to Delete a row in a Gridview. If the user select the delete button in the row it wants to delete a message must pop up to ask the user if he/she is sure they want to delete the row.
For this use a make a javascript function in which use a confirm box if it returns true then delete the row else not.Register this javascript function to every row at rowdatabound function.For deleting the row from the gridview check the link below. Deleting row from gridview[^] You can also check this link for your whole solution Deleting giridview row with confirmation[^]
Cheers!! Brij