Results 1 to 3 of 3

Thread: [RESOLVED] Datagridview

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    20

    Resolved [RESOLVED] Datagridview

    I'm currently using c#.net visual studio 2010.

    Can I use a Datagridview or a list box as a lookup
    table and compare a variable integer

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

    Re: Datagridview

    If you want to display data to the user then use a control but if you don't want to display anything to the user then don't use a control. Do you want to display data to the user?

    A DataGridView is good for displaying and editing tabular data while the ListBox is for displaying a simple list. If the user makes a selection from either then yes, you can get a value from the corresponding record and compare to some other variable. Exactly how depends on the specific circumstances but, with the ListBox, you would likely set the DisplayMember, ValueMember and DataSource and then use the SelectedValue.
    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
    Junior Member
    Join Date
    Nov 2012
    Posts
    20

    Re: Datagridview

    Thanks for your input, I think I understand
    what you are saying and I appreciate your
    quick response.

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