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. DataGrid

DataGrid

Scheduled Pinned Locked Moved ASP.NET
questioncsharpannouncementlearning
6 Posts 2 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.
  • K Offline
    K Offline
    kenexcelon
    wrote on last edited by
    #1

    I'm learning ASP .NET 2.0. I have a question about the DataGrid (gridview) component. I am working on a simple project where I would like to have a textbox where a user can update hours. Is it possible for every row to have a text box there so anyone can change several hours for each row and save them all at once? That way, no one would have to click edit, and then update for each row. This is the only field editable on this page. Thanks for you input.

    K C 2 Replies Last reply
    0
    • K kenexcelon

      I'm learning ASP .NET 2.0. I have a question about the DataGrid (gridview) component. I am working on a simple project where I would like to have a textbox where a user can update hours. Is it possible for every row to have a text box there so anyone can change several hours for each row and save them all at once? That way, no one would have to click edit, and then update for each row. This is the only field editable on this page. Thanks for you input.

      K Offline
      K Offline
      kenexcelon
      wrote on last edited by
      #2

      Also, I would like to have concurrency to be able to still be used.

      1 Reply Last reply
      0
      • K kenexcelon

        I'm learning ASP .NET 2.0. I have a question about the DataGrid (gridview) component. I am working on a simple project where I would like to have a textbox where a user can update hours. Is it possible for every row to have a text box there so anyone can change several hours for each row and save them all at once? That way, no one would have to click edit, and then update for each row. This is the only field editable on this page. Thanks for you input.

        C Offline
        C Offline
        cst_cfit
        wrote on last edited by
        #3

        yes u can do it by custom code. dont use the update option of gridview. place a button in the page and in button clik u can write sql query to insert values in each row to dbase by looping thru the rows in the gridview.. u can ,make use of SqlTransaction to insert all the records in a transaction. foreach(GridviewRow gv in Gridview1.Rows) { // write code for inserting values into database from each row }

        CST

        K 1 Reply Last reply
        0
        • C cst_cfit

          yes u can do it by custom code. dont use the update option of gridview. place a button in the page and in button clik u can write sql query to insert values in each row to dbase by looping thru the rows in the gridview.. u can ,make use of SqlTransaction to insert all the records in a transaction. foreach(GridviewRow gv in Gridview1.Rows) { // write code for inserting values into database from each row }

          CST

          K Offline
          K Offline
          kenexcelon
          wrote on last edited by
          #4

          Ok, from there, how would you have that one field editable via a non-read only text box?

          C 1 Reply Last reply
          0
          • K kenexcelon

            Ok, from there, how would you have that one field editable via a non-read only text box?

            C Offline
            C Offline
            cst_cfit
            wrote on last edited by
            #5

            could u explain?? place textbox in templatefield of gridview. then u can edit..

            CST

            K 1 Reply Last reply
            0
            • C cst_cfit

              could u explain?? place textbox in templatefield of gridview. then u can edit..

              CST

              K Offline
              K Offline
              kenexcelon
              wrote on last edited by
              #6

              Yes sorry , I want the user to be able to make a bulk edit as it were. The gridview way that I know, you have to edit one row at a time by clicking the edit button. Is there a way to make all of the textboxes editable or will your suggestion work?

              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