Hello,
I have RadEditor and a Table within a RadListView.
When someone clicks on one of the cells in the Table, I want to paste text from the cell into the RadEditor.
I have the functionality working when the RadEditor is
not within a RadListView, but I am not sure how to make it work within the RadListView.
Here is the code for the RadEditor when it is
not in the RadListView -
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
$(document).ready(function ()
{
$('.clickMe').each(function ()
{
$(this).attr("unselectable", "on");
$(this).click(function ()
{
var editor = $find("<%=reKeyLink.ClientID%>");
editor.pasteHtml($(this).text());
});
});
});
</script>
</telerik:RadScriptBlock>
-------------------------------------------------------------------------------
<div style="clear: left; margin-top: 15px; width:825px">
<div style="float:left;">
<telerik:RadEditor ID="reKeyLink" runat="server" Skin="Windows7" ViewStateMode="Disabled"
ToolsFile="~/App_Themes/public/ToolsLimited.xml" Height="235px" Width="625px">
</telerik:RadEditor>
</div>
<div class="Tokens" id="overlay" style="float:left; visibility:hidden; border: 1px solid #A5B3C5; width:185px; text-align:center; margin-left:10px;">
<table id="tableid">
<tr style="width:184px">
<td class="clickMe" style=" text-align:right; width:92px">{ACCOUNT_ID}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{ADDR_LINE1}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{ADDR_LINE2}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{CITY}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{COMPANY}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{EMAIL_ADDR}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{FIRST_NAME}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{LAST_LOGIN}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{LAST_NAME}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{LOCATION}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{MIDDLE_INIT}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{NICKNAME}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{POS_CUST_ID}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{PREFIX_NAME}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{REVIEWER_ID}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{STATE}</td>
</tr>
<tr>
<td class="clickMe" style=" text-align:right">{SUFFIX_NAME}</td><td style="width:5px"></td><td class="clickMe" style=" text-align:left">{ZIPCODE}</td>
</tr>
</table>
</div>
<div style="clear: left;">
<asp:RequiredFieldValidator ID="rfvKeyLink" runat="server" ControlToValidate="reKeyLink"
ValidationGroup="AddKeyLink" Display="Dynamic" Text="Key link text is required." />
</div>
</div>
I wish to make the code above to work in a RadListView defined like so -
Can you help?
Thanks!