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. strange error in DataGridView Control windows Forms

strange error in DataGridView Control windows Forms

Scheduled Pinned Locked Moved C#
helpcsharpvisual-studiowinformsquestion
5 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.
  • R Offline
    R Offline
    Rocky
    wrote on last edited by
    #1

    Hello every one, well I've encountered a really weird eror in datagridview here. I'm workin in C# 2.0 windows form application and there is a dgv(datagridview) on it that is attached to a view..I added an unbound column in it to take the quantity from the user. Now when I get the value of quantity from a cell of that column I get a null when I put 1 in that cell where is its always the correct value whenever its not 1. Can any buddy plz tell me whats happening here. I receive the correct value when its 0, 2, 3 4 ... but its a null when its 1... What should I do.. is it a bug in VS or what?? thanks in advance Rocky

    T D 2 Replies Last reply
    0
    • R Rocky

      Hello every one, well I've encountered a really weird eror in datagridview here. I'm workin in C# 2.0 windows form application and there is a dgv(datagridview) on it that is attached to a view..I added an unbound column in it to take the quantity from the user. Now when I get the value of quantity from a cell of that column I get a null when I put 1 in that cell where is its always the correct value whenever its not 1. Can any buddy plz tell me whats happening here. I receive the correct value when its 0, 2, 3 4 ... but its a null when its 1... What should I do.. is it a bug in VS or what?? thanks in advance Rocky

      T Offline
      T Offline
      t4ure4n
      wrote on last edited by
      #2

      can u post ur code to give an idea what u r doin

      o O º(`'·.,(`'·., ☆,.·''),.·'')º O o° »·'"`»* *☆ t4ure4n ☆* *«·'"`« °o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°

      R 1 Reply Last reply
      0
      • R Rocky

        Hello every one, well I've encountered a really weird eror in datagridview here. I'm workin in C# 2.0 windows form application and there is a dgv(datagridview) on it that is attached to a view..I added an unbound column in it to take the quantity from the user. Now when I get the value of quantity from a cell of that column I get a null when I put 1 in that cell where is its always the correct value whenever its not 1. Can any buddy plz tell me whats happening here. I receive the correct value when its 0, 2, 3 4 ... but its a null when its 1... What should I do.. is it a bug in VS or what?? thanks in advance Rocky

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

        How are you attaching it to the view, through a bindingsource or just saying DGV.DataSource=theView; Also, how are you trying to access the value of the cell?

        R 1 Reply Last reply
        0
        • D Drew McGhie

          How are you attaching it to the view, through a bindingsource or just saying DGV.DataSource=theView; Also, how are you trying to access the value of the cell?

          R Offline
          R Offline
          Rocky
          wrote on last edited by
          #4

          I attached it through a binding source but now the problem is solved as I just deleted that column and made a new one with a different name. I bound the datagrid with the usual procedure of using a datasource u know but I still dont know what happened there but its working fine now. thank God..:cool: thanks alot! Rocky

          1 Reply Last reply
          0
          • T t4ure4n

            can u post ur code to give an idea what u r doin

            o O º(`'·.,(`'·., ☆,.·''),.·'')º O o° »·'"`»* *☆ t4ure4n ☆* *«·'"`« °o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°

            R Offline
            R Offline
            Rocky
            wrote on last edited by
            #5

            well I sorted out that wrror by making a new column with a different name and I deleted that column but it was weird u know...

            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