Custom/Extended properties with inotifypropertychanged

Posts   
 
    
OSSistemes
User
Posts: 19
Joined: 20-Nov-2019
# Posted on: 05-Dec-2019 10:10:47   

Hi,

Finally we buyed the software, very nice, and a lot to learn, but will be funny!!

Here of firts little problem.

We need to create some properties on the Entity that not mapped on database. So we create a partial class and define it.



public partial class TiquetsLinEntity
    {

        private bool _selected;

    
        public bool Selected
        {
            get { return _selected; }
            set { _selected = value;

                OnPropertyChanged("Selected");
            
            }
        }

    }


We subscribe to event "EntityContentsChanged" and when a propierty/fields change, the event raise, but if we modify our "custom" propierty the event don't raise.

I dont know if this is the corret way to get this. We look on llblgen designer if its possible to create a field without mapping, but we don't find it.

Any help

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 06-Dec-2019 05:56:12   

Either listen to the onPropertyChaned() because that's the event you raised in your custom property Set.

Or raise OnEntityContentsChanged();

public partial class TiquetsLinEntity
    {

        private bool _selected;

    
        public bool Selected
        {
            get { return _selected; }
            set { _selected = value;

                OnPropertyChanged("Selected");
                OnEntityContentsChanged();          
            }
        }

    }
OSSistemes
User
Posts: 19
Joined: 20-Nov-2019
# Posted on: 10-Dec-2019 09:27:51   

Thanks!! All ok now!