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. ComboBox problem

ComboBox problem

Scheduled Pinned Locked Moved C#
helpdatabasequestion
2 Posts 2 Posters 0 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.
  • K Offline
    K Offline
    khosnur
    wrote on last edited by
    #1

    Dear coders, I think i am fallen in simple problem but i can't fix it.Please Help me. Problem is:i take a combobox in a datagridview. i just change the Column type and i wrote this code: RoomTypeBLL objRoomTypeBLL = new RoomTypeBLL(); colType.DataSource = objRoomTypeBLL.GetAllRoomTypeData(); colType.ValueMember = "fldRoomTypeAutoID"; colType.DisplayMember = "fldTypeName"; How i save combobox value member value into database? Thanks in advance

    D 1 Reply Last reply
    0
    • K khosnur

      Dear coders, I think i am fallen in simple problem but i can't fix it.Please Help me. Problem is:i take a combobox in a datagridview. i just change the Column type and i wrote this code: RoomTypeBLL objRoomTypeBLL = new RoomTypeBLL(); colType.DataSource = objRoomTypeBLL.GetAllRoomTypeData(); colType.ValueMember = "fldRoomTypeAutoID"; colType.DisplayMember = "fldTypeName"; How i save combobox value member value into database? Thanks in advance

      D Offline
      D Offline
      dojohansen
      wrote on last edited by
      #2

      I am confused. What is actually the problem? Does your code not compile? Does it crash at run-time? Does it not display the data correctly? Can't you edit it? Or it it that you don't know how to save to the db? If so, what does it have to do with the combo box? Databases usually don't have strong opinions about how data should be edited outside of the database. Most of them are only fussy about who they give out data to and who gets to update them, and sometimes what data they will accept. Also, from the code you posted it appears you are using some form or shape of business layer, so saving is probably done by calling a method on the business object. But how people out here in the world can be expected to know the design of your business objects better than you do is beyond me.

      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