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. General Programming
  3. C#
  4. dataGrid & first row selection

dataGrid & first row selection

Scheduled Pinned Locked Moved C#
question
4 Posts 3 Posters 1 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.
  • M Offline
    M Offline
    moonangel_bio
    wrote on last edited by
    #1

    I use selected row data of dataGrid to load data into textboxes When I select the first row of the dataGrid no data is loaded into the textboxes But when I select any other row, it’s data is loaded to the textboxes, then the first row can be loaed too...!!!!? If any one knows the reason why the first row don't load until i select any other row at first, I’ll be grateful

    C D 2 Replies Last reply
    0
    • M moonangel_bio

      I use selected row data of dataGrid to load data into textboxes When I select the first row of the dataGrid no data is loaded into the textboxes But when I select any other row, it’s data is loaded to the textboxes, then the first row can be loaed too...!!!!? If any one knows the reason why the first row don't load until i select any other row at first, I’ll be grateful

      C Offline
      C Offline
      CodyGen
      wrote on last edited by
      #2

      try posting your code so we can determine what is going on. :)

      1 Reply Last reply
      0
      • M moonangel_bio

        I use selected row data of dataGrid to load data into textboxes When I select the first row of the dataGrid no data is loaded into the textboxes But when I select any other row, it’s data is loaded to the textboxes, then the first row can be loaed too...!!!!? If any one knows the reason why the first row don't load until i select any other row at first, I’ll be grateful

        D Offline
        D Offline
        Drew McGhie
        wrote on last edited by
        #3

        How are you loading the data into the textboxes? If you're handling the rowEnter event, I don't believe its raised on the form/page load. Try going to any other row, then back to the first and see if it loads. If that's so, you may have to either just manually enter the data into the columns the first time, or use a different event. As another option, look into databinding. There are a couple WONDERFUL articles on it here at codeproject that you can search for.

        M 1 Reply Last reply
        0
        • D Drew McGhie

          How are you loading the data into the textboxes? If you're handling the rowEnter event, I don't believe its raised on the form/page load. Try going to any other row, then back to the first and see if it loads. If that's so, you may have to either just manually enter the data into the columns the first time, or use a different event. As another option, look into databinding. There are a couple WONDERFUL articles on it here at codeproject that you can search for.

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

          thanx for help

          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