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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to delete items in gridview with one delete button

How to delete items in gridview with one delete button

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
5 Posts 4 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.
  • S Offline
    S Offline
    sabby2006
    wrote on last edited by
    #1

    i have a gridview and i want to delete items from that gridview but i want to do that with the help of one delete buttonj Just like it is in the case of mails. all this with asp.net 2.0

    Regards

    N S 2 Replies Last reply
    0
    • S sabby2006

      i have a gridview and i want to delete items from that gridview but i want to do that with the help of one delete buttonj Just like it is in the case of mails. all this with asp.net 2.0

      Regards

      N Offline
      N Offline
      Nizha J
      wrote on last edited by
      #2

      in your datagrid have a template column. the header template of the template column must have a check box so the when we click that the check boxes of the item template will get seleted. and the have a button as delete selected.

      Nizha

      S 1 Reply Last reply
      0
      • N Nizha J

        in your datagrid have a template column. the header template of the template column must have a check box so the when we click that the check boxes of the item template will get seleted. and the have a button as delete selected.

        Nizha

        S Offline
        S Offline
        sabby2006
        wrote on last edited by
        #3

        is this button "delete selected. " in bulid or i have to write the code for this. if u can help with this

        Regards

        K 1 Reply Last reply
        0
        • S sabby2006

          i have a gridview and i want to delete items from that gridview but i want to do that with the help of one delete buttonj Just like it is in the case of mails. all this with asp.net 2.0

          Regards

          S Offline
          S Offline
          surshbabuk
          wrote on last edited by
          #4

          U have a template column then u can easily delete teh record

          suresh babu.k

          1 Reply Last reply
          0
          • S sabby2006

            is this button "delete selected. " in bulid or i have to write the code for this. if u can help with this

            Regards

            K Offline
            K Offline
            krishna19
            wrote on last edited by
            #5

            Add the delete button in template column. In Initialise_components, wire the delete link for the datagrid. datagrid.deletecommand = .... (press tab twice) Them write the code to delete the row in the function generated.

            If you fail for the first time , call it version 1.0.

            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