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.
Unfortunately, activation email could not send to your email. Please try again.

Dropping data into the detail grid.

Thread ID:

Created:

Updated:

Platform:

Replies:

94632 May 25,2010 04:29 AM Jun 1,2010 02:50 PM WPF 1
loading
Tags: GridControl
WojciechCzapla
Asked On May 25, 2010 04:29 AM

Hi,
I'm using GridDataControl with one masterdetail relation with data bounded through the ObservableCollection. What I need to do is to drop data object onto the detail grid. Regarding this, I have two questions:

1. How to get access to detail grid to set 'AllowDrop' property to true?

2. How to get data object bounded to the grid row based on cursor position.

Best Regards

Ganesan K [Syncfusion]
Replied On June 1, 2010 02:50 PM

Hi,

Thanks for using Syncfusion products.

Regarding #1, Setting AllowDrop property in the Master Grid is enough, no need to set this for ChildGrid.

Regarding #2, you can use the following code to acheive this,

var rowColIndex = this.dataGrid.Model.Grid.PointToCellRowColumnIndex(e.GetPosition(this.dataGrid.Model.Grid));
var record = this.dataGrid.Model.Table.GetRecordFromRow(rowColIndex.RowIndex);

Please let us know if you need any more details.

Thanks,
Ganesan

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.

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.

;