Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Delete Gridview Row using Ajax in VS 2008

Delete Gridview Row using Ajax in VS 2008

Scheduled Pinned Locked Moved ASP.NET
helpcsharpvisual-studioquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Elizma
    wrote on last edited by
    #1

    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

    B N 2 Replies Last reply
    0
    • E 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

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • E 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

        N Offline
        N Offline
        N a v a n e e t h
        wrote on last edited by
        #3

        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 an UpdatePanel control so that it will be updated without a page refresh.

        Navaneeth How to use google | Ask smart questions

        1 Reply Last reply
        0
        • B Brij

          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

          E Offline
          E Offline
          Elizma
          wrote on last edited by
          #4

          Thank you so much. You are a life saver!!!! Kind Regards, Elizma

          B 1 Reply Last reply
          0
          • E Elizma

            Thank you so much. You are a life saver!!!! Kind Regards, Elizma

            B Offline
            B Offline
            Brij
            wrote on last edited by
            #5

            ;) ;)

            Cheers!! Brij

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups