This is a migrated thread and some comments may be shown as answers.

How can I initiate (raise) BeginningEdit event without of using of RadPropertyGrid.BeginEdit method?

1 Answer 92 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Eugene
Top achievements
Rank 1
Eugene asked on 29 Apr 2016, 08:44 AM
I write WPF MVVM Prism 6 application and try to use RadPropertyGrid. How can I initiate (raise) BeginningEdit event without of using of RadPropertyGrid.BeginEdit method? I cant call BeginEdit method because my application is pure MVVM one and I don't use codebehind. If I simply change the value of the property by typing the value of selected property then BeginningEdit event is not raised. Is there a way to initiate BeginningEdit event in MVVM application without call of BeginEdit method?

1 Answer, 1 is accepted

Sort by
0
Accepted
Maya
Telerik team
answered on 02 May 2016, 08:54 AM
Hello Eugene,

Generally, events are intended to be used as an indication that the user has performed a certain action. So, calling them inside your code is not a recommended way to go. Why not performing the logic inside the code that updates the value? 
Nevertheless, BeginningEdit event can be called as any other: 
var editArgs = new PropertyGridBeginningEditEventArgs()
            {
                RoutedEvent = RadPropertyGrid.BeginningEditEvent
            };
 
            this.propertyGrid.RaiseEvent(editArgs);

But still, please keep in mind that events are supposed to be raised by the UI, not by some logic inside the end user code. 

Regards,
Maya
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
PropertyGrid
Asked by
Eugene
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or