Solved

INotifyPropertyChanged w/ ADO.NET Entity and RadGridView WPF vb.net

Posted on 2010-11-11
2
1,056 Views
Last Modified: 2012-05-10
Hi,

I am using an ADO.NET Entity of my SQL Server database as the business object for the itemsource of a Telerik RadGridView in WPF (vb).  How can I implement INotifyPropertyChanged so that the grid can maintain up to date data?  
0
Comment
Question by:ccwestbrook
2 Comments
 
LVL 15

Accepted Solution

by:
x77 earned 500 total points
ID: 34114307
Implemnt the INotifyPropertyChanged is easy

You add the Implements clause to your class:

Friend Class Rgra
    Implements INotifyPropertyChanged


This add a Event to your Class

    Public Event PropertyChanged As PropertyChangedEventHandler _
        Implements INotifyPropertyChanged.PropertyChanged


You can then Raise the event on each Set Property

     Public Property mLeft() As Double
        Get
            Return _mLeft
        End Get
        Set(ByVal value As Double)
            _mLeft = value
           RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("mLeft"))
        End Set
    End Property


But note that you are using  a String "mLeft" to do it.
You can read an excelent article to avoid that.

http://www.deanchalk.me.uk/post/WPF-e28093-Easy-INotifyPropertyChanged-Via-DynamicObject-Proxy.aspx
0
 

Author Comment

by:ccwestbrook
ID: 34114621
Thanks.  The problem I have is the ADO.NET Entity is an .edmx xml file, not a .vb class file.  I read that INotifyPropertChanged can be used for it but I don't see how.  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now