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. WCF and WF
  4. how to stop binding temporary ?

how to stop binding temporary ?

Scheduled Pinned Locked Moved WCF and WF
questionwpfwcfbusinesshelp
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.
  • F Offline
    F Offline
    Feras Mazen Taleb
    wrote on last edited by
    #1

    I'm using CSLA Framework in my business logic layer I want to use undo feature for this reason I have to Unbind the DataControl [i.e ComboBox] and rebind it to the collection source okay you may say that's very easy

    ComboBox1.ItemsSource = null;

    and after making my undo operation

    ComboBox1.ItemsSource = DataCollection ;

    I will say : you'r right but when setting the itemsSource to Null , the items in Combo will disappear the problem wil become bigger if I use DataGrid so How can I Unbind Control with out emptying its items ???:confused: :rolleyes: --- I know my be my question is ... ---

    You have To Search About The Truth Of Your Life Why Are you Here In Life ?

    P 1 Reply Last reply
    0
    • F Feras Mazen Taleb

      I'm using CSLA Framework in my business logic layer I want to use undo feature for this reason I have to Unbind the DataControl [i.e ComboBox] and rebind it to the collection source okay you may say that's very easy

      ComboBox1.ItemsSource = null;

      and after making my undo operation

      ComboBox1.ItemsSource = DataCollection ;

      I will say : you'r right but when setting the itemsSource to Null , the items in Combo will disappear the problem wil become bigger if I use DataGrid so How can I Unbind Control with out emptying its items ???:confused: :rolleyes: --- I know my be my question is ... ---

      You have To Search About The Truth Of Your Life Why Are you Here In Life ?

      P Offline
      P Offline
      Pankaj Chamria
      wrote on last edited by
      #2

      Why do you need to unbind and re-bind to provide the undo feature? You can use the Observable collection in which any changes you do/ undo will automatically reflect in the UI controls it is bound to. (Your type object will have to implement INotifyPropertyChanged event for this.) If you still want to bind-unbind the ItemSource without having your combobox loose its items. You will probably have to work with 2 collections mirroring each other. (i do not recommend this :>)

      Pankaj Chamria, Software Developer.

      F 1 Reply Last reply
      0
      • P Pankaj Chamria

        Why do you need to unbind and re-bind to provide the undo feature? You can use the Observable collection in which any changes you do/ undo will automatically reflect in the UI controls it is bound to. (Your type object will have to implement INotifyPropertyChanged event for this.) If you still want to bind-unbind the ItemSource without having your combobox loose its items. You will probably have to work with 2 collections mirroring each other. (i do not recommend this :>)

        Pankaj Chamria, Software Developer.

        F Offline
        F Offline
        Feras Mazen Taleb
        wrote on last edited by
        #3

        thanks a lot for your answer I need to stop binding when I call BeginEdit method this method in Csla so I read in CSLA Book " [[if you want to use the undo feature manually you have to call BeginEdit before you bind the object to UI and you have to Rebind the object after canceling or applying changes made to the object]] " that's why I asked about pausing or stopping binding to UI Maybe I misunderstood the CSLA Undo Feature. any way after applying changes I rebinded the object to UI and work fine so thanks

        You have To Search About The Truth Of Your Life Why Are you Here In Life ?

        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