I use RadSpreadsheet control to display spreadsheet. I will like to find out cell number - row and column - where the user is pointing his mouse to. I will like to drag a string and drop it at this location.
2 Answers, 1 is accepted
0
Anna
Telerik team
answered on 04 Oct 2018, 02:03 PM
Hi,
You can do this by subscribing to the MouseUp event of the editor of the RadSpreadsheet. We have to keep in mind that the MouseUp event is already handled internally, so we'll have to subscribe with the option to receive handled events too. The presenter that is contained in the editor has a handy method GetCellIndexFromViewPoint which we can use to get the index. The code below shows what I have in mind:
position = new Point(position.X - columnHeadingWidth, position.Y - rowHeadingHeight); // Adjusting for the row and column headings.
CellIndex index = presenter.GetCellIndexFromViewPoint(position);
}
I hope this helps.
Regards,
Anna
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.