Solved

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

Posted on 2010-11-11
2
1,058 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 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