Solved

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

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 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

14 Experts available now in Live!

Get 1:1 Help Now