Hi, I am having a Radeditor control. When i click on the radgrid i need insert the text to radeditor on the current cursor point. i can able to detect the row click event. but the content is not inserted into radeditor and i can't set focus to radeditor.
Hi,
It will be helpful if i get a quick response for this issue from forums . please let me know whether this is possible to paste a content from radgrid value to editor control, on the cursor point.
To achieve the desired behavior you can attach to the OnRowClick client event of RadGrid and get the content of the clicked cell (eventArgs.get_itemIndexHierarchical().toString()). Then, you can use the pasteHtml() method of the Editor which will paste the cell's content at the last cursor position in the control (0 if not otherwise initialized).
I have prepared and attached a sample project for illustrative purposes, which you can freely extend to fit you requirements.
Should you want to change the cursor's position dynamically you can refer to the getRange() and selectRange()client functions of the Editor.
The pasteHtml() method for pasting in the cursor posoition has already been discussed in your other thread with the same question: Paste the Content at the Cursor point.
Regards,
Ivaylo
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Hi lvaylo, Thanks for your reply. I tried your solution, but still I miss something i couldn't get the focus of rad editor. I think I miss in following part as