I try to make a RadListBox inside the Custom Dialog. I would like to pass the value from RadListBox to parent page when I double clicking on it. I try using editor.pasteHtml funcion in double click event of RadListBox but it won't work.
Could you please tell me where I went wrong.
My source code like below.
WebForm.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebEditor.WebForm1" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title></head><body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <script> Telerik.Web.UI.Editor.CommandList["InsertLexicon"] = function (commandName, editor, args) { var myCallbackFunction = function (sender, args) { editor.pasteHtml(args.image); } editor.showExternalDialog( "InsertLexicon.aspx", {}, 400, 560, myCallbackFunction, null, "InsertLexicon", true, Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, false, true); }; function pasteLexicon(myData) { var editor = $find('<%= edComment.ClientID%>'); editor.pasteHtml(myData); } </script> <br /> <br /> <br /> <br /> <telerik:RadEditor RenderMode="Lightweight" runat="server" ID="edComment" EditType="Inline" NewLineMode="Br" ToolsFile="ToolsFile.xml"> </telerik:RadEditor> </div> </form></body></html>
InsertLexicon.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="InsertLexicon.aspx.vb" Inherits="WebEditor.InsertLexicon" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="StyleSheets/Editor.css" rel="stylesheet" type="text/css" /> <title>InsertLexicon</title></head><body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> <Scripts> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> </Scripts> </telerik:RadScriptManager> <script type="text/javascript"> function getRadWindow() //mandatory for the RadWindow dialogs functionality { if (window.radWindow) { return window.radWindow; } if (window.frameElement && window.frameElement.radWindow) { return window.frameElement.radWindow; } return null; } function initDialog() //called when the dialog is initialized { var clientParameters = getRadWindow().ClientParameters; } if (window.attachEvent) { window.attachEvent("onload", initDialog); } else if (window.addEventListener) { window.addEventListener("load", initDialog, false); } function insertLexicon() //fires when the Insert Link button is clicked { var closeArgument = {}; var list = $find("<%= listComment.ClientID%>"); var item = list.get_selectedItem(); if (item == null || item == undefined) { alert("請選擇詞庫"); return false; } else { closeArgument.image = item.get_value(); getRadWindow().close(closeArgument); } } function closeWindow() { getRadWindow().close(); } function OnClientItemDoubleClicked(sender, args) { var closeArgument = {}; var list = $find("<%= listComment.ClientID%>"); var item = list.get_selectedItem(); getRadWindow().get_browserWindow().pasteLexicon(item.get_value()); } </script> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> </telerik:RadAjaxManager> <!--Tool--> <telerik:RadListBox RenderMode="Lightweight" runat="server" ID="listComment" Height="350px" Width="100%" ButtonSettings-AreaWidth="35px" OnClientItemDoubleClicked="OnClientItemDoubleClicked"> <Items> <telerik:RadListBoxItem Text="Value1" Value="value1"></telerik:RadListBoxItem> <telerik:RadListBoxItem Text="Value2" Value="Value2"></telerik:RadListBoxItem> </Items> </telerik:RadListBox> <br /> <div > <telerik:RadButton RenderMode="Lightweight" AutoPostBack="false" ID="RadButton6" runat="server" OnClientClicked="insertLexicon" Text="Save" /> <telerik:RadButton RenderMode="Lightweight" AutoPostBack="false" ID="RadButton7" runat="server" OnClientClicked="closeWindow" Text="Close" /> </div> </form></body></html>Hi,
We have a grid and a custom skin for it. In order to show grid images for "Add New", "Edit", "Delete", "Filter", etc... we put all grid related images into "~/images/grid" directory, based on this article
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/appearance-and-styling/skins
However, we also use buttons "Export To PDF" and "Export To Excel", which correct names are not mentioned in the above article.
What are the correct names we should use for these button so the images show in the grid header?
Thanks,
Evgeniya


<property name="MediaFilters"> <item>*.wmv</item> <item>*.avi</item> <item>*.mpeg</item> <item>*.mpg</item> <item>*.mov</item> <item>*.flv</item> <item>*.m4v</item> <item>*.mp3</item> <item>*.mp4</item> </property>Hi,
When a document is uploaded through document manager in telerik editor, Is it possible to
Save the document in different server shared folder path?
Save a uploaded document in two different path at the same time ?
Currently we are save the uploaded files in same server as below,
editor.SetPaths(new string[] { "~/users/downloads"}, EditorFileTypes.Documents, EditorFileOptions.All);
Thanks
I have received the data in json format as follows:
var mydata = [
{
"Title":"My Grid Example",
"NumberOfColumns":4,
"DatasetHeader":{"items":[
{"Name":"FullName","Type":"System.String"},
{"Name":"Age","Type":"System.Int32"},
"Name":"Address","Type":"System.String"},
{"Name":"Cost","Type":"System.Double"}
]},
"Rows":["items":[
{"Rohan","12","Arab","234"},
{"Radha","11","Texas","123"},
{"Haris","22","NPL","344"},
{"Christine","23","Arab","674"},
{"Tot","22","UK","434"},
{"Terry","21","LA","334"},
{"Savana","19","SA","224"}
]}
}];
Now, I want to generate the dynamic grid with the above data with 4 columns and 7 rows (for this case) . The columns can varies during runtime (from 2-3 to 14-15)
Something like this is expected:
<script>
$(document).ready(function () {
generateGrid(mydata);
}
function generateGrid(receiveddata) {
$("#table-grid").kendoGrid({
dataSource: { data: receiveddata.Rows.Items},
height: 400,
scrollable: true,
schema: {
model: receiveddata.DatasetHeader.items
},
title: receiveddata.title
});
} //end of javascript function
</script>
<div id="table-grid"></div>

Hi,
I'm having a problem with a RadEditor that I have on a RadWindow. When I set the height above about 140px, The editable part only fills up the first 140px, but the frame is the size I've defined. See that attached image for a better description than I can give.
Here's the markup:
<telerik:RadEditor ID="redLogText" runat="server" EditModes="Design" MaxTextLength="4000" SkinID="DefaultSetOfTools" ContentAreaMode="Div" OnClientInit="CharCountInit" Height="255px" Width="70%" Style="background-color: White; display: inline-block;" Skin="Default"> <Tools> <telerik:EditorToolGroup> <telerik:EditorSeparator Visible="true" /> <telerik:EditorTool Name="Cut" /> <telerik:EditorTool Name="Copy" /> <telerik:EditorTool Name="Paste" /> <telerik:EditorSeparator Visible="true" /> <telerik:EditorSplitButton Name="Undo" /> <telerik:EditorSplitButton Name="Redo" /> <telerik:EditorSeparator Visible="true" /> <telerik:EditorTool Name="Bold" /> <telerik:EditorTool Name="Italic" /> <telerik:EditorTool Name="Underline" /> <telerik:EditorSeparator Visible="true" /> <telerik:EditorTool Name="JustifyLeft" /> <telerik:EditorTool Name="JustifyRight" /> <telerik:EditorTool Name="JustifyCenter" /> <telerik:EditorSeparator Visible="true" /> <telerik:EditorDropDown Name="FontName" /> <telerik:EditorDropDown Name="FontSize" /> <telerik:EditorSeparator Visible="true" /> <telerik:EditorTool Name="AjaxSpellCheck" /> </telerik:EditorToolGroup> </Tools> <Modules> <telerik:EditorModule Name="RadEditorStatistics" Visible="true" Enabled="true"></telerik:EditorModule> </Modules></telerik:RadEditor>
Hi... I use my document management system project radasyncupload. But when upload pdf file with radasyncupload after client download pdf file has problem. When clients open pdf file Failed to load PDF document error display in screen...
<telerik:RadAsyncUpload ID="doc_upload" runat="server"
ChunkSize="13000" Skin="MetroTouch" MultipleFileSelection="Automatic" Width="100%" PostbackTriggers="bt_accept">
<Localization Select="..." Remove="Clear" />
<FileFilters>
<telerik:FileFilter Extensions="zip,xls,xlsx,doc,docx,pdf,jpg" />
</FileFilters>
</telerik:RadAsyncUpload>

I have a grid that I have setup to dynamically change the pageSize based on the window size. When the browser window size changes I call the following code:
var grid = $("#grid").data("kendoGrid");
var currentPage = grid.dataSource.page();
var currentPageSize = grid.dataSource.pageSize();
if (currentPageSize !== newPageSize) {
grid.dataSource.pageSize(newPageSize);
}
This works fine, but I noticed that the call to .pageSize(x) triggers a POST request to the server to fetch new data. Whenever I fetch new data from the server I need to run code based on whether or not the call to the server is successful or a failure. For example, when I want to refresh this grid manually (without changing the pageSize) I call:
grid.dataSource.read().then(function () {
doStuffOnSuccess();
}).fail(function () {
doStuffOnFailure();
});
Unfortunately there is no promise returned from the pageSize() method that would allow me to hook into the actual result of the POST request sent. As a result I have to call both the pageSize(x) and the manual grid.dataSource.read() methods together, and this generates two POST requests that degrades performance.
Is there some way of passing a new pageSize in the grid.dataSource.read() method? Or some way of seeing if the POST request triggered by pageSize(x) was successful or failed?