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.
Syncfusion Feedback

Current Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

101028 Sep 20,2011 10:43 PM UTC Jan 6,2012 12:43 PM UTC WPF 1
loading
Tags: SpreadsheetControl(Classic)
Scott Griswold
Asked On September 20, 2011 10:43 PM UTC

Hello,

I am trying to implement a drag and drop operation from a tree view control to the spreadsheet control. How do I get the cell value of the cell that the item is being dropped onto?

Scott





Ponraja A [Syncfusion]
Replied On January 6, 2012 12:43 PM UTC

Hi Scott,

Sorry for the delay caused.

You can get the dropped row and column index of the grid, by using the PointToCellRowColumnIndex method as shown in the following code.

Sample Code [C#]

void SpreadSheetControl_Drop(object sender, DragEventArgs e)
{
var point = e.GetPosition(spreadSheetControl);
GridControlBase grid = spreadSheetControl.GridProperties.CurrentCell.Grid;
RowColumnIndex rowColumnIndex = grid.PointToCellRowColumnIndex(point);
var cellvalue = grid.Model[rowColumnIndex.RowIndex, rowColumnIndex.ColumnIndex].CellValue;
}

Please let us know if you have any queries.

Regards,
Ponraja



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

;