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. General Programming
  3. C#
  4. DataGrid Textbox will not apply value unless enter is pushed

DataGrid Textbox will not apply value unless enter is pushed

Scheduled Pinned Locked Moved C#
questiondatabasehelp
4 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.
  • B Offline
    B Offline
    Brad Wick
    wrote on last edited by
    #1

    I have a DataGrid on my form that users type in numbers. The problem them I am having is that if they do not hit enter after they type in the number, that value is never set. How can I change this so its value is set without the user having to push enter? Is it the way I am pulling the data or something else? TixTypeQuanity = dataGridTicketTypes.Rows[dataGridTicketTypes.Rows[dgvr.Index].Index].Cells[4].Value.ToString();

    A M 2 Replies Last reply
    0
    • B Brad Wick

      I have a DataGrid on my form that users type in numbers. The problem them I am having is that if they do not hit enter after they type in the number, that value is never set. How can I change this so its value is set without the user having to push enter? Is it the way I am pulling the data or something else? TixTypeQuanity = dataGridTicketTypes.Rows[dataGridTicketTypes.Rows[dgvr.Index].Index].Cells[4].Value.ToString();

      A Offline
      A Offline
      Aghosh Babu
      wrote on last edited by
      #2

      you can set the AUTOPOST property in asp.

      B 1 Reply Last reply
      0
      • A Aghosh Babu

        you can set the AUTOPOST property in asp.

        B Offline
        B Offline
        Brad Wick
        wrote on last edited by
        #3

        I was able to fix this as I had the datagrid set as this.dataGridTicketTypes.CausesValidation = false; changing this to true fix the issue

        1 Reply Last reply
        0
        • B Brad Wick

          I have a DataGrid on my form that users type in numbers. The problem them I am having is that if they do not hit enter after they type in the number, that value is never set. How can I change this so its value is set without the user having to push enter? Is it the way I am pulling the data or something else? TixTypeQuanity = dataGridTicketTypes.Rows[dataGridTicketTypes.Rows[dgvr.Index].Index].Cells[4].Value.ToString();

          M Offline
          M Offline
          Mogesh
          wrote on last edited by
          #4

          Text box lost focus simple solution

          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