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
A

Art Frank

@Art Frank
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • .NET DataGridView question
    A Art Frank

    If you don't use a SQLDataAdapter as your binding source, what do you recommend? There appear to be a few different ways to bind the the DataGridView to the database -- I think I just used a method I found in Microsoft's docs. (While I'm a resonably experienced programmer, I'm pretty new to .NET.)

    Database question csharp database sql-server design

  • .NET DataGridView question
    A Art Frank

    Thanks for the advice. I think I'll do what you suggest -- force the user to double-click the row to edit, then present a form showing just that record. Since the editing is minimal, I was hoping to get away with just a table, but this is probably better design.

    Database question csharp database sql-server design

  • .NET DataGridView question
    A Art Frank

    A contrived example that demonstrates what I'm trying to accomplish: Four tables, like so: main_table: persons_name car color car_lookup: car_id car_description color_lookup: color_id color_description car_color: car_id color_id The idea is that for each type of car in the car_lookup table, there are only a few values in the color_lookup table that are valid. The car_color table has the all of the color_id values that are valid for each car_id (that is, if I select all of the rows for a particluar car_id, I'll retrieve all of the valid color_ids for that car). Question 1: ok design? Is there a better way to approach this? Question 2: I'm using a DataGridView to present the main_table to the end-user for editing. Works fine when I'm just presenting the table with the car and color fields just showing ID numbers. How can I present the data so that the DataGridView presents the car_description instead of the car_id that is in the car field (and this one field is not changeable) and for the color field present a drop down of just the valid colors for the given car_id? This would mean that the drop down is different for each row. If car #1 could be only green or blue, whereas car #2 could be blue or red, then the drop down would reflect that. The database is on a SQL server, the DataGridView is connected to a BindingSource, which is connected to a SqlDataAdapter. Unsure if this belongs in the .NET section or here. Apologies if this is the wrong place. I'm writing in C#, but any general DataGridView info would be appreciated.

    Database question csharp database sql-server design
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups