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 SelectedValue Problem.

Combobox SelectedValue Problem.

Scheduled Pinned Locked Moved C#
databasewpfwcfhelp
3 Posts 3 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.
  • D Offline
    D Offline
    Dotnetkanna
    wrote on last edited by
    #1

    Hi, Im using windows form combobox, binding the value using Binding object,after retreving from the database,im using Combobox.selectedvalue="2"; after the form load completion the selected value is not get retaining. im using combobox style as dropdown. Regards Kanna

    A S 2 Replies Last reply
    0
    • D Dotnetkanna

      Hi, Im using windows form combobox, binding the value using Binding object,after retreving from the database,im using Combobox.selectedvalue="2"; after the form load completion the selected value is not get retaining. im using combobox style as dropdown. Regards Kanna

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      Try to set this Combobox.selectedvalue="2"; value (through code) in the loaded event of the form.

      My signature "sucks" today

      1 Reply Last reply
      0
      • D Dotnetkanna

        Hi, Im using windows form combobox, binding the value using Binding object,after retreving from the database,im using Combobox.selectedvalue="2"; after the form load completion the selected value is not get retaining. im using combobox style as dropdown. Regards Kanna

        S Offline
        S Offline
        Seishin
        wrote on last edited by
        #3

        I assume you try setting the value after you bind the control to your data.. if the value is bound to int datacolumn then drop the " - use integers.. also you may try setting ComboBox.BindingContext property to parenting Form.BindingContext. ex. cmb.BindingContext = this.BindingContext;

        life is study!!!

        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