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. Gridview : Need help about it [modified]

Gridview : Need help about it [modified]

Scheduled Pinned Locked Moved ASP.NET
9 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.
  • D Offline
    D Offline
    diacoboss
    wrote on last edited by
    #1

    I am trying to link the following buttons of my gridview "update, delete and insert". I does not work since last week. So the message error is in french, anyway it means "the objectdatasource can't find the delete method (or insert and update). If someone can give a help about that.Thanks

    modified on Tuesday, March 31, 2009 5:10 AM

    G A V 3 Replies Last reply
    0
    • D diacoboss

      I am trying to link the following buttons of my gridview "update, delete and insert". I does not work since last week. So the message error is in french, anyway it means "the objectdatasource can't find the delete method (or insert and update). If someone can give a help about that.Thanks

      modified on Tuesday, March 31, 2009 5:10 AM

      G Offline
      G Offline
      Greg Chelstowski
      wrote on last edited by
      #2

      Try adding an update, delete and insert methods to your SqlDataAdapter. Duh.

      var question = (_2b || !(_2b));

      D 1 Reply Last reply
      0
      • G Greg Chelstowski

        Try adding an update, delete and insert methods to your SqlDataAdapter. Duh.

        var question = (_2b || !(_2b));

        D Offline
        D Offline
        diacoboss
        wrote on last edited by
        #3

        Methods are created, by another members of my team @ work, what i dont know is how to link the methods to my delete button for example. I have all informations i need about the the methods created by my collegue (he has tooken 10days of)

        1 Reply Last reply
        0
        • D diacoboss

          I am trying to link the following buttons of my gridview "update, delete and insert". I does not work since last week. So the message error is in french, anyway it means "the objectdatasource can't find the delete method (or insert and update). If someone can give a help about that.Thanks

          modified on Tuesday, March 31, 2009 5:10 AM

          A Offline
          A Offline
          anilpal
          wrote on last edited by
          #4

          hi, R u from Frans?

          Regards Anil Pal

          1 Reply Last reply
          0
          • D diacoboss

            I am trying to link the following buttons of my gridview "update, delete and insert". I does not work since last week. So the message error is in french, anyway it means "the objectdatasource can't find the delete method (or insert and update). If someone can give a help about that.Thanks

            modified on Tuesday, March 31, 2009 5:10 AM

            V Offline
            V Offline
            vinodkrebc
            wrote on last edited by
            #5

            You have to add the method on on deleting event of gridview and onselectedindexchanging event If you do so I may work Thank You Vinod Kr.

            D 1 Reply Last reply
            0
            • V vinodkrebc

              You have to add the method on on deleting event of gridview and onselectedindexchanging event If you do so I may work Thank You Vinod Kr.

              D Offline
              D Offline
              diacoboss
              wrote on last edited by
              #6

              Hi, it's done about de gridview (objectdatasource properties) but i did not done anything about "onselectedindexchanging event" can you explain more about dis last point cuze i don't have many skills on it. Thank you

              V 1 Reply Last reply
              0
              • D diacoboss

                Hi, it's done about de gridview (objectdatasource properties) but i did not done anything about "onselectedindexchanging event" can you explain more about dis last point cuze i don't have many skills on it. Thank you

                V Offline
                V Offline
                vinodkrebc
                wrote on last edited by
                #7

                Hi, You have to just write code on selectedindex change event I am sure you will be able to do that...... There is an event on Gridview selectedindex changing on that You can add the method Vinod Kr. Software Engineer EBC Publishing Lucknow

                D 1 Reply Last reply
                0
                • V vinodkrebc

                  Hi, You have to just write code on selectedindex change event I am sure you will be able to do that...... There is an event on Gridview selectedindex changing on that You can add the method Vinod Kr. Software Engineer EBC Publishing Lucknow

                  D Offline
                  D Offline
                  diacoboss
                  wrote on last edited by
                  #8

                  Hi I have tried this : protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Metier_Taxi.Gestion_Utilisateurs Utilisateur = new Metier_Taxi.Gestion_Utilisateurs(); Utilisateur.Supprimer(Convert.ToInt64(GridView1.SelectedRow.Cells[1].Text)); } Do you notice anything wrong or something to add ? Thanks

                  V 1 Reply Last reply
                  0
                  • D diacoboss

                    Hi I have tried this : protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Metier_Taxi.Gestion_Utilisateurs Utilisateur = new Metier_Taxi.Gestion_Utilisateurs(); Utilisateur.Supprimer(Convert.ToInt64(GridView1.SelectedRow.Cells[1].Text)); } Do you notice anything wrong or something to add ? Thanks

                    V Offline
                    V Offline
                    vinodkrebc
                    wrote on last edited by
                    #9

                    GridView1.SelectedRow.Cells[1].Text is right if you have not used template...... If it is stil giving error please try this Gridview.Rows[e.NewSelectedIndex].Cells[1].Text this might work if you are not using any template in gridview Hope This Will Work Thank You Vinod Kr.

                    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