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.
Up arrow icon