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. Rowfilter

Rowfilter

Scheduled Pinned Locked Moved C#
wpfwcfhelpquestion
3 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.
  • T Offline
    T Offline
    topcatalpha
    wrote on last edited by
    #1

    Hi, My combobox is bound to a dataset1.tables[0].defaultview. The values of my combobox to dataset2.tables[0].defaultview. During inserting i set the rowfilter of dataset2.tables[0].defaultview which works fine. The nbr of items in the combobox is limited to the records i filtered. After choosing a selection and after edit, my combobox.selectedvalue = 147 (the unique key in the dataset.) But when i set the rowfilter back to string.empty my selectedValue of my combobox becomes <null> but in the combobox there's still the correct last selected text. Result is that i get an error if i want to edit the same record again, even when everything looks fine to the user. So it seems that the binding is mixed up or so. Anyone any idea what goes wrong ? Thx Kurt

    K 1 Reply Last reply
    0
    • T topcatalpha

      Hi, My combobox is bound to a dataset1.tables[0].defaultview. The values of my combobox to dataset2.tables[0].defaultview. During inserting i set the rowfilter of dataset2.tables[0].defaultview which works fine. The nbr of items in the combobox is limited to the records i filtered. After choosing a selection and after edit, my combobox.selectedvalue = 147 (the unique key in the dataset.) But when i set the rowfilter back to string.empty my selectedValue of my combobox becomes <null> but in the combobox there's still the correct last selected text. Result is that i get an error if i want to edit the same record again, even when everything looks fine to the user. So it seems that the binding is mixed up or so. Anyone any idea what goes wrong ? Thx Kurt

      K Offline
      K Offline
      KaptinKrunch
      wrote on last edited by
      #2

      combobox.Text = ""; should fix you up.

      Just because we can; does not mean we should.

      T 1 Reply Last reply
      0
      • K KaptinKrunch

        combobox.Text = ""; should fix you up.

        Just because we can; does not mean we should.

        T Offline
        T Offline
        topcatalpha
        wrote on last edited by
        #3

        thx mate and a happy new year. Kurt

        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