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. Windows Forms
  4. edit or update problem

edit or update problem

Scheduled Pinned Locked Moved Windows Forms
helpcssannouncement
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.
  • V Offline
    V Offline
    vinayh
    wrote on last edited by
    #1

    Hi, I am going to edit and update record in datagrid , every time I am able to edit or update one record and again I m going to click button of grid view getting this error “Cannot set the SelectedValue in a ListControl with an empty ValueMember.” .. then again close to application and able to do edit and update any one record…

    Vinay

    D A 2 Replies Last reply
    0
    • V vinayh

      Hi, I am going to edit and update record in datagrid , every time I am able to edit or update one record and again I m going to click button of grid view getting this error “Cannot set the SelectedValue in a ListControl with an empty ValueMember.” .. then again close to application and able to do edit and update any one record…

      Vinay

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Your explanation made absolutely no sense what-so-ever.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      1 Reply Last reply
      0
      • V vinayh

        Hi, I am going to edit and update record in datagrid , every time I am able to edit or update one record and again I m going to click button of grid view getting this error “Cannot set the SelectedValue in a ListControl with an empty ValueMember.” .. then again close to application and able to do edit and update any one record…

        Vinay

        A Offline
        A Offline
        Arindam Sinha
        wrote on last edited by
        #3

        Hi Vinay, With this minimum explanation, it seems that you are using data binding. Also, you have some ListControl in your form as well which is related to the same datasource (i.e. same datatable might be used for Grid and that control). This list control does not have blank value in its master data. Verify this one otherwise try to debug (setting break points whereever ValueMember is set) your code to find out where you are getting the error.

        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