Closed: PropertyChanged event doesn't work at client side

Nov 23, 2011 at 9:01 AM

I attempted to customize the generated STE, to detect property changed then invoke some external call to perform validation.

somehow the propertychanged event neved worked.

i guess it's properly due to serialization process. but I explicitly bind the event onDeserialized as well.

maybe this is the nature of WCF data object, only datamembers are usable after serialized?

Coordinator
Nov 23, 2011 at 1:58 PM

For auto-generated data members of STE, you can simply subscribe to the property changed event on the client side.

Are you trying to create some client-side only properties? I guess I still do not fully understand what exactly you are trying to do.

Thanks,

Nov 24, 2011 at 4:21 AM

i want to detect property changed event.

the generated ste only has this inside

private event PropertyChangedEventHandler _propertyChanged;

 

I temp addin code into

        public void Initialize()
        {
            this._propertyChanged += new PropertyChangedEventHandler(MySTE_PropertyChanged);
        }

        public MySTE()
        {
            Initialize();
        }

        public void OnDeserializedMethod(StreamingContext context)
        {
            Initialize();
            IsDeserializing = false;
...

the generated ste with



but when i made changes over the prop, MySTE_PropertyChanged never get invoked.

Nov 24, 2011 at 5:58 AM

nvm, i found out the problem is due to vs2010

whatever changes i made onto the ste, the dll/new-assembly didn't get refresh in another specific project.

i dunno why. I just manually remove the dll in the project output bin/debug , then add back the reference, anything back to normal again.