Results 1 to 3 of 3

Thread: DataGridView drop down cell

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2008
    Posts
    284

    DataGridView drop down cell

    I am able to successfully get a value from a datagridview using the following code:
    Code:
    MsgBox(Files.Item(4, i).Value)
    When the cell has a drop down, I am not able to get the value, it just comes back blank.

    How can I get the value from a drop down box?
    I am still very new to VB.NET, so I have MANY questions

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: DataGridView drop down cell

    The Value is the value of the cell regardless of its type. If the Value property is Nothing then the cell has no value in it. You might like to take a look at this to get a better understanding of how ComboBoxes work in DataGridViews.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2008
    Posts
    284

    Re: DataGridView drop down cell

    I got it! It was I guess the value wasn't really set...
    I am still very new to VB.NET, so I have MANY questions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width