We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataControl Drag&Drop failure?

Thread ID:

Created:

Updated:

Platform:

Replies:

95678 Jul 23,2010 03:19 PM UTC Jul 28,2010 07:37 AM UTC WPF 1
loading
Tags: GridControl
sgonline
Asked On July 23, 2010 03:19 PM UTC

Hi there,

I have a question about the GridDataControl binding. In the official sample, I saw the code as follows:





...
...
ShowGroupDropArea="True"
AutoPopulateRelations="False"
ShowAddNewRow="False"
ItemsSource="{StaticResource dataSource}">

In this way, it's like the binding to a class and the drag & drop works perfectly.

However, as I changed the binding from the resource to a class to directly binding to an object instance in the code behind, as follows:
ShowGroupDropArea="True"
AutoPopulateRelations="False"
ShowAddNewRow="False"
ItemsSource="{Binding myInstance}">

The drag & drop functionality disappeared. I checked the output from the debugger, and found the following error suspicious:
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Background; DataItem=null; target element is 'GeometryDrawing' (HashCode=21905215); target property is 'Brush' (type 'Brush').

I want to know that is it possible that I could bind to an instance but not a class since I want to populate data into that instance from some external methods, while at the same time have the drag & drop functionality still available.

Thank you very much.

Jeraldes J [Syncfusion]
Replied On July 28, 2010 07:37 AM UTC

Hi,

Thank you for your interest in Syncfusion products.

For your reference we have created a sample regarding the binding of the data in the griddatacontrol with the groupdrop area.

Please download the sample from the below link.

http://www.syncfusion.com/uploads/redirect.aspx?file=GCD-Binding_354d4071.zip&team=development

Let us know if you need any other details.

Regards
Jeraldes J

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;