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. code for data editing in grid view.

code for data editing in grid view.

Scheduled Pinned Locked Moved ASP.NET
csharpcsshelp
10 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.
  • A Offline
    A Offline
    AhsanS
    wrote on last edited by
    #1

    Hi fellows. This is the third time i am posting this message.I have a very simple problem. I just want to know how can we get new values from the datagrid after we have updated them in rowupdating even. i am using vs2005 with c#. kindly post a sample if possible. Ahsan Ullah

    A A 2 Replies Last reply
    0
    • A AhsanS

      Hi fellows. This is the third time i am posting this message.I have a very simple problem. I just want to know how can we get new values from the datagrid after we have updated them in rowupdating even. i am using vs2005 with c#. kindly post a sample if possible. Ahsan Ullah

      A Offline
      A Offline
      amaneet
      wrote on last edited by
      #2

      Hi, In 1.1 bind the datagrid again with the connection and querystring.You will get the datagrid with updated values. in case of 2.0 I don't know the procedure.But try ate same above procedure Bye.

      A K 2 Replies Last reply
      0
      • A amaneet

        Hi, In 1.1 bind the datagrid again with the connection and querystring.You will get the datagrid with updated values. in case of 2.0 I don't know the procedure.But try ate same above procedure Bye.

        A Offline
        A Offline
        AhsanS
        wrote on last edited by
        #3

        if i databind it again than it will be bound with the old values again.i want to bind it with new values. and for that purpose i want to save new values in datasource. i am unable to get new values. Ahsan Ullah

        A 1 Reply Last reply
        0
        • A AhsanS

          if i databind it again than it will be bound with the old values again.i want to bind it with new values. and for that purpose i want to save new values in datasource. i am unable to get new values. Ahsan Ullah

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

          There might some problem in updating the data.I mean your updation may no be taking place successully.

          A 1 Reply Last reply
          0
          • A amaneet

            There might some problem in updating the data.I mean your updation may no be taking place successully.

            A Offline
            A Offline
            AhsanS
            wrote on last edited by
            #5

            i am able to edit the data.but i want to save it as well.and for saving i have to get it.and i dont know how to get that edited data from that cell.

            A 1 Reply Last reply
            0
            • A AhsanS

              i am able to edit the data.but i want to save it as well.and for saving i have to get it.and i dont know how to get that edited data from that cell.

              A Offline
              A Offline
              amaneet
              wrote on last edited by
              #6

              In 1.1 the code is dim str as string = e.item.cell[0].text. dim str1 as string = e.item.cell[1].control[0] dim str2 as string = e.item.cell[2].control[0] Now apply the query update table name set abc = str1 , abc1 = str2 where abc2 = str.

              A 1 Reply Last reply
              0
              • A amaneet

                In 1.1 the code is dim str as string = e.item.cell[0].text. dim str1 as string = e.item.cell[1].control[0] dim str2 as string = e.item.cell[2].control[0] Now apply the query update table name set abc = str1 , abc1 = str2 where abc2 = str.

                A Offline
                A Offline
                AhsanS
                wrote on last edited by
                #7

                problem is that e.item.cell isnt working in2.0 what is the alternate to it? Ahsan Ullah

                A 1 Reply Last reply
                0
                • A AhsanS

                  problem is that e.item.cell isnt working in2.0 what is the alternate to it? Ahsan Ullah

                  A Offline
                  A Offline
                  amaneet
                  wrote on last edited by
                  #8

                  Sorry, I already told I don't know 2.0. Sir,I posted a question having title Please correct the code in vb.net 1.1 just near your question Can you help me please Thanks and regards Amaneet Brar

                  1 Reply Last reply
                  0
                  • A AhsanS

                    Hi fellows. This is the third time i am posting this message.I have a very simple problem. I just want to know how can we get new values from the datagrid after we have updated them in rowupdating even. i am using vs2005 with c#. kindly post a sample if possible. Ahsan Ullah

                    A Offline
                    A Offline
                    albCode
                    wrote on last edited by
                    #9

                    http://www.asp.net/QuickStart/aspnet/doc/data/advanced.aspx

                    1 Reply Last reply
                    0
                    • A amaneet

                      Hi, In 1.1 bind the datagrid again with the connection and querystring.You will get the datagrid with updated values. in case of 2.0 I don't know the procedure.But try ate same above procedure Bye.

                      K Offline
                      K Offline
                      kiran kumar Intelligroup
                      wrote on last edited by
                      #10

                      i think you are binding the datagrid in not postback block ex:- if(!IsPostBack) { bindgrid(); } if yes just remove that condition

                      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