<script type=
"text/javascript"
>
function
showCustomDialog() {
debugger;
var
argument = {};
var
callbackFunction =
function
(sender, args) {
var
oTextBox = $get(
"ImageSrc"
);
oTextBox.value = args;
}
var
dialogOpener = Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference().get_dialogOpener();
dialogOpener.openUrl(
"/custom_editors/Images.aspx"
, argument, 900, 650, callbackFunction,
null
,
"image manager"
,
true
, 36,
false
,
true
);
}
</script>
<
div
id
=
"InsertImage"
class
=
"reInsertImageWrapper"
style
=
"display: none;"
>
<
table
cellspacing
=
"0"
cellpadding
=
"0"
border
=
"0"
class
=
"reControlsLayout"
>
<
tr
>
<
td
style
=
"vertical-align: top;"
>
<
label
class
=
"reDialogLabelLight"
for
=
"ImageSrc"
>
<
span
>[imagesrc]</
span
>
</
label
>
</
td
>
<
td
class
=
"reControlCellLight"
>
<
table
border
=
"0"
cellpadding
=
""
cellspacing
=
"0"
>
<
tr
>
<
td
>
<
input
type
=
"text"
id
=
"ImageSrc"
class
=
"rfdIgnore"
/>
</
td
>
<
td
style
=
"padding-left: 4px;"
>
<
input
id
=
"Button1"
type
=
"image"
value
=
"Browse"
onClick
=
"showCustomDialog();return false;"
src
=
"/images/icons/image_add.png"
class
=
"imgButton"
/>
<
tools:StandardButton
runat
=
"server"
ToolName
=
"ImageManager"
id
=
"ImageManagerCaller"
/>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
<
tr
>
<
td
>
<
label
class
=
"reDialogLabelLight"
for
=
"ImageAlt"
>
<
span
>[imagealttext]</
span
>
</
label
>
</
td
>
<
td
class
=
"reControlCellLight"
>
<
input
type
=
"text"
id
=
"ImageAlt"
class
=
"rfdIgnore"
/>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
class
=
"reImgPropertyControlCell"
>
<
table
cellpadding
=
"0"
cellspacing
=
"0"
>
<
tr
>
<
td
>
<
label
class
=
"reDialogLabelLight"
for
=
"ImageWidth"
>
<
span
>[width]</
span
>
</
label
>
</
td
>
<
td
>
<
input
type
=
"text"
id
=
"ImageWidth"
class
=
"rfdIgnore"
/> px
</
td
>
<
td
>
<
label
class
=
"reDialogLabelLight"
for
=
"ImageHeight"
>
<
span
>[height]</
span
>
</
label
>
</
td
>
<
td
>
<
input
type
=
"text"
id
=
"ImageHeight"
class
=
"rfdIgnore"
/> px
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
>
<
table
border
=
"0"
cellpadding
=
"0"
cellspacing
=
"0"
class
=
"reConfirmCancelButtonsTblLight"
>
<
tr
>
<
td
align
=
"right"
>
<
button
type
=
"button"
id
=
"iplInsertBtn"
>
[ok]
</
button
>
</
td
>
<
td
>
<
button
type
=
"button"
id
=
"iplCancelBtn"
>
[cancel]
</
button
>
</
td
>
</
tr
>
</
table
>
</
td
>
</
tr
>
</
table
>
</
div
>
function OnRowClick(sender, eventArgs) {
alert(
"Row-Clicking")
}
function RowDoubleClick(sender, eventArgs) {
alert(
"Double-clicking")
}
<
telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="false"
AllowMultiRowSelection="False" AllowPaging="True" GridLines="Both" ShowGroupPanel="false"
OnItemCommand="RadGrid_ItemCommand" OnNeedDataSource="RadGrid_NeedDataSource"
OnItemDataBound="OnGridItemDataBound">
<PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle>
<MasterTableView DataKeyNames="MeterStationNumber" AllowMultiColumnSorting="False">
----
</MasterTableView>
<
ClientSettings AllowDragToGroup="false" EnableRowHoverStyle="true" >
<ClientEvents OnRowDblClick="RowDoubleClick" OnRowClick="OnRowClick"/>
</ClientSettings>
JavaScript Error #1:
ASP.NET Ajax client-side framework failed to load.
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
JavaScript Error #2:
Sys is not defined
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('RadScriptManager1', document.getElementById('editorform'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00SU'], [], [], 90);
//]]>
</script>
JavaScript Error #3:
RadEditorCommandList is not defined
RadEditorCommandList['Edit Link'] = function(commandName, editor, oTool)
{
_editor = editor;
_point = editor.CreateRestorePoint();
var selection = editor.GetSelection();
var pe = selection.GetParentElement();
var id = '';
if (pe && pe.tagName.toLowerCase() == 'a' && pe.attributes['cms:asset_id']) {
id = pe.attributes['cms:asset_id'].value;
}
window.top.InlineLinkEditor.selection = selection.GetText();
window.top.InlineLinkEditor.show('elementid=' + $('__elementId').value + '&xrefid=' + id + '&html=' + encodeURIComponent(selection.GetHtmlText()), editLink, null);
};