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. Image for the cookie policy date

Dropping data into the detail grid.

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

1 Reply

GK Ganesan K Syncfusion Team June 1, 2010 06:50 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon