7 Answers, 1 is accepted
0
Joël
Top achievements
Rank 2
answered on 28 Sep 2011, 03:57 PM
Could somebody help me? I need really this function quickly. Thanks.
0
Hello Laurent,
I have prepared an example project that illustrates a basic drag and drop scenario between a RadPropertyGrid and a ListBox. Would you please shed some more light on your requirements, especially on RadRichTextBox's role, in case that you have met any obstacles while adapting the approach from my project to your needs? I am attaching the example for your reference.
Best wishes,
Ivan Ivanov
the Telerik team
I have prepared an example project that illustrates a basic drag and drop scenario between a RadPropertyGrid and a ListBox. Would you please shed some more light on your requirements, especially on RadRichTextBox's role, in case that you have met any obstacles while adapting the approach from my project to your needs? I am attaching the example for your reference.
Best wishes,
Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Joël
Top achievements
Rank 2
answered on 29 Sep 2011, 01:21 PM
Thank you very much Ivan,
I see the principle well now.
Unfortunately, I have just tested your application and this one does not function,
function
always return null
I see the principle well now.
Unfortunately, I have just tested your application and this one does not function,
function
e.GetElement<PropertyGridField>(Mouse.GetPosition(this))
always return null
0
Joël
Top achievements
Rank 2
answered on 29 Sep 2011, 01:36 PM
I have just remade some tests with your application, apparently, that functions but it takes PropertyGridField located at the top of that selected.
Therefore, that operation not if I Drag "Age", but if I Drag “FirstName”, it find “Age”
Moreover, that functions only if I am in full screen.
Therefore, that operation not if I Drag "Age", but if I Drag “FirstName”, it find “Age”
Moreover, that functions only if I am in full screen.
0
Joël
Top achievements
Rank 2
answered on 29 Sep 2011, 01:46 PM
I found the solution, it seems to me.
In
I have replace
by
PropertyGridField field = e.Options.Source as PropertyGridField;
In
private void OnDragQuery(object sender, DragDropQueryEventArgs e)
I have replace
PropertyGridField field = e.GetElement<PropertyGridField>(Mouse.GetPosition(grille));
by
PropertyGridField field = e.Options.Source as PropertyGridField;
0
De
Top achievements
Rank 1
answered on 05 Jun 2014, 09:20 PM
With the new DragDropManager (instead of RadDragAndDropManager), how to get the PropertyGridField when mouse is dragging over it?
(The DragEventArgs is not the same as DragDropQueryEventArgs. It doesn't have GetElement().
(The DragEventArgs is not the same as DragDropQueryEventArgs. It doesn't have GetElement().
0
Hello,
You can use the e.OriginalSource property in combination with the ParentOfType extension method to get the target PropertyGridField.
Hope this helps.
Regards,
Nik
Telerik
You can use the e.OriginalSource property in combination with the ParentOfType extension method to get the target PropertyGridField.
var field = e.OriginalSource as PropertyGridField ?? (e.OriginalSource as FrameworkElement).ParentOfType<
PropertyGridField
>();
Hope this helps.
Regards,
Nik
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.