INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Show Database Enum Types in Datagrid with Ability to Update DB table

Show Database Enum Types in Datagrid with Ability to Update DB table

Show Database Enum Types in Datagrid with Ability to Update DB table

(OP)
Hi,

I have a mysql database with an enumerated type/column, the column is a varchar type and is limited to coupe, sedan, station_wagon. So when I edit a table cell in phpmyadmin for example it drops down and I have only those choices for the cell value.

In VS 2010 C# I have a datagridview of another table without the enumerated column just to initially test things out. With "select *" show the table in a form/datagrid. I also have it set up where I can edit this datagridview's cells and it will update the values in the mysql table.

What I want to do is show the user the mysql table with enumerated cols (and it also has some cols which are not enumerated too) in a datagridview and have a drop-down for the enum table cols in the datagrid where the user can select and also have the action of updating the actual mysql table.

How is this done? I can provide existing code if needed. Thanks.

RE: Show Database Enum Types in Datagrid with Ability to Update DB table

You simply create manually the datagridview and use a DataGridViewComboBoxColumn binded to that column

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close