Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
192 views
I am developing a booking system by using RadScheduler.
I want to add a treeview in the 'group by' area, so that the root of treeview will be 'Floor', and the nodes will be 'Room'.
How can I do that?

Thanks.
Nick
Top achievements
Rank 1
 answered on 21 Nov 2011
1 answer
444 views
Hi,
How can I set date to RadDateTimePicker?

In browser it shows following error - 

TypeError: Object [object Object] has no method 'set_selectedDate'

My Web method returns date - 

[System.Web.Services.WebMethod]
        public static DateTime Calculate(int type, int noMonths, int noDays, int noOfWeeks, System.DateTime DateOfjoin)
        {
                  return DateTime.Now;
        }

Shinu
Top achievements
Rank 2
 answered on 21 Nov 2011
2 answers
185 views
Hi.
 I tried to use the Radmenu with cookieless and with cookies, and have observed that it does not appear in a cookies less environment, where as the top menu appears, but nothing appears for submenu items.
  Is there any config or settings that I am missing, which is required to make the rad sub menu work in a cookies less environment.

 The difference lies in making changes to the web.config.

1.  'CookieLess='useUri' --> for Cookie Less
     <sessionState mode="InProc" cookieless="useUrl" timeout="900"/>  and 'UseUri'


2. CookieLess = 'UseCookies' for working with cookies.
     <sessionState mode="InProc" cookieless="UseCookies" timeout="900"/>  and 'UseCookies'


In case 2, telerik rad menu and submenu works fine, but in case 1, When we want it to be cookieless it does not works.

Thanks in Advance.

Regards

SANDIP


forms name=".ASPXAUTH"
             loginUrl="Login.aspx"
             protection="All"
             timeout="30"
             path="/"
             requireSSL="false"
             slidingExpiration="true"
             defaultUrl="Default.aspx"
             cookieless="UseCookies"
<sessionState mode="InProc" cookieless="false" timeout="900"/>
<authentication mode="Forms">
      <forms name=".ASPXAUTH"
             loginUrl="Login.aspx"
             protection="All"
             timeout="30"
             path="/"
             requireSSL="false"
             slidingExpiration="true"
             defaultUrl="Default.aspx"
             cookieless="UseCookies" />
</authentication>

forms name=".ASPXAUTH"
             loginUrl="Login.aspx"
             protection="All"
             timeout="30"
             path="/"
             requireSSL="false"
             slidingExpiration="true"
             defaultUrl="Default.aspx"
             cookieless="UseCookies"
Tonino
Top achievements
Rank 1
 answered on 21 Nov 2011
1 answer
164 views
Hi, I dinamically generate many controls in TemplateColumn of RadGrid in  ItemCreated event.
But in every postback my object were destroy.

Can I block the life cycle of RadGrid (PreInit,Load,etc. etc.) for have a static radgrid ?

Thanks,
Marco
Princy
Top achievements
Rank 2
 answered on 21 Nov 2011
2 answers
207 views
Is a setting available for the RadFileExplorer which will allow for only single clicks on items, rather than allowing a double click on a given item?

The EnableOpenFile-"False" property is set on the RadFileExplorer, but this does not disallow double clicking;

Any insight is appreciated;  Best regards - Rob
Dobromir
Telerik team
 answered on 21 Nov 2011
3 answers
586 views
Hi,

I'm using RadComboBox with Checkboxes. The event OnItemChecked is not fired when you check/uncheck the All checkbox. Is there a way to determine when the user check/uncheck the all checkbox?

Best Regards
//HK
Kalina
Telerik team
 answered on 21 Nov 2011
8 answers
271 views
We are in the process of upgrading the RadWindow controls on our application from using the RadWindow Classic to using the Q3 2008 release of RadControls for ASP.NET AJAX.  When setting the IconUrl in the html it is set to a value of "~/Images/16x16/document.gif", however, when it is rendered and I view source it is shown as "//Images/16x16/document.gif".  This causes the image to not be displayed.  I have already removed the old skin folder for the old controls and am using the built in Default2006 skin.  I searched through our code base for any reference to IconUrl and the only references I find are in the html where it sets up the window control.  Does anyone have any input as to what may be causing this issue?
Marin Bratanov
Telerik team
 answered on 21 Nov 2011
1 answer
99 views
i have two RadWindows, and i am using RadAjaxManager1_AjaxRequest   to update a DIV on OnClientClose event of RadWindow1. This works, but RadWindow2 also triggers this event and causes it to error. can someone help me with this issue. the div is inside an update panel and it still errors. This is the error i get

Error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_MP_CPH1_ctl00_MP_CPH1_dv_PreviewPanel'. If it is being updated dynamically then it must be inside another UpdatePanel.

i attached an image for the code snippets, any help is appreciated. Thank you.

Murali.
Marin Bratanov
Telerik team
 answered on 21 Nov 2011
6 answers
156 views
Hi,

A colleague and I have run into problems hooking up an event for a button click on a user-control which is being dynamically loaded.
Basically, we are trying to get tabs to load on demand.
We have done up an example which can be downloaded here (we've used the dll - Telerik.Web.UI, Version=2011.2.712.40 and its skin dll Telerik.Web.UI.Skins.dll).

The button on the user control can be seen if you just load the Default page. If you click the button, a post ensues (as per the normal input/forms web model) but the click handler never catches the fired event. Debugging that handler demonstrates this. In fact, we're not 100% sure that the event fired. All we know is that the form posts to the server.

What do we need to do to successfully subscribe to that click event? This is clearly as a result of dynamically loading the usercontrol. We just cannot figure out "the why", and how to fix it. It seems as though the javascript which is normally rendered by the Button server control is not being hooked up properly. Perhaps it's a ViewState thing?

Cheers
David
Top achievements
Rank 1
 answered on 21 Nov 2011
3 answers
221 views
Hello all,

I am new to Telerik RadControls and currently I am working on RadEditor Control for the application I am developing using ASP.Net 3.5 Ajax... I would like to know whether is it possible to "Add textbox to RadEditor's Tool Collection"
<%@ Page Language="C#" MasterPageFile="~/Layout3columnHeader.Master" AutoEventWireup="true" 
    CodeBehind="~/welcomeScreen.aspx.cs" Inherits="Waivenet.welcomeScreen" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %> 
<asp:Content ID="headContent" ContentPlaceHolderID="headph" runat="server"> 
<script type="text/javascript"> 
            //<![CDATA[
                /************************************************
                *
                *    Tool with custom rendering
                *
                ************************************************/
                var defaultoInputWidthValue = "set Width...";
                var defaultoInputHeightValue = "set Height...";
                var defaultoInputUrlValue = "add URL...";
                if ("undefined" == typeof(RadEditorToolInitializer))
                {
                    var RadEditorToolInitializer = {};
                }
                /* RadEditorToolInitializer is a global object that contains initializer functions for custom tools */
                RadEditorToolInitializer["CustomRenderedTool"] = function (toolArgs)
                    {
                        function CustomRenderedTool(toolArgs)
                        {
                            this.Controller = toolArgs.Controller;
                            this.Name = toolArgs.Name;                            
                        }
                        CustomRenderedTool.prototype.Create = function()
                        {
                            var oInputWidth = document.createElement ("INPUT");
                            oInputWidth.type = "text";
                            oInputWidth.style.width = "75px";
                            oInputWidth.value = defaultoInputWidthValue;
                            oInputWidth.onclick = function(){if (this.value == defaultoInputWidthValue)this.value = ""};
                            var oInputHeight = document.createElement ("INPUT");
                            oInputHeight.type = "text";
                            oInputHeight.style.width = "75px";
                            oInputHeight.value = defaultoInputHeightValue;
                            oInputHeight.onclick = function(){if (this.value == defaultoInputHeightValue)this.value = ""};
                            
                            var oInputUrl = document.createElement ("INPUT");
                            oInputUrl.type = "text";
                            oInputUrl.style.width = "90px";
                            oInputUrl.value = defaultoInputUrlValue;
                            oInputUrl.onclick = function(){if (this.value == defaultoInputUrlValue)this.value = ""};
                            
                            var oButton = document.createElement ("INPUT");
                            oButton.type = "button";
                            oButton.value= "Insert!";
                            oButton.className = "RadEButton";
                            var controller = this.Controller;
                            var toolObject = new Object();
                            toolObject.widthHolder = oInputWidth;
                            toolObject.heightHolder = oInputHeight;
                            toolObject.className = "CustomRenderedTool";   
                            toolObject.urlHolder = oInputUrl;
                            oButton.onclick= function anon (e)
                            {
                                controller.Fire("CustomRenderedTool", toolObject);
                                return false;
                            };
                            var oHolder = document.createElement ("DIV");
                            oHolder.appendChild (oInputWidth);
                            oHolder.appendChild (oInputHeight);
                            oHolder.appendChild (oInputUrl);                    
                            oHolder.appendChild (oButton);
                            return oHolder;
                            return oButton;
                        };
                                                
                        return new CustomRenderedTool (toolArgs);
                    };
            //]]> 
            </script> 
</asp:Content> 
<asp:Content ID="menuContent" ContentPlaceHolderID="menuph" runat="server"> 
    <div id="cusotmizeScreenDiv" style="float: right; margin-top: 3.5%;"> 
        <asp:Panel ID="cmsPanel" runat="server" ScrollBars="Auto" GroupingText="Content Management"> 
            <asp:CheckBoxList ID="cblCustomizeLayout" runat="server"> 
            </asp:CheckBoxList> 
            <br /> 
            <asp:Button ID="btEnable" runat="server" Text="Enable Selected" OnClick="btEnableClick" 
                ToolTip="Click to enable the status of the seletced blocks" /> 
            <br /> 
            <br /> 
            <asp:Button ID="btDisable" runat="server" Text="Disable Selected" OnClick="btDisableClick" 
                ToolTip="Click to disable the status of the seletced blocks" /> 
        </asp:Panel> 
    </div> 
</asp:Content> 
<asp:Content ID="mainContent" ContentPlaceHolderID="mainph" runat="server"> 
 
    <script type="text/javascript"> 
        function setStyle(editor, args) { 
            var style = editor.get_contentArea().style; 
            style.backgroundImage = "none"; 
            style.backgroundColor = "white"; 
            style.color = "black"; 
            style.fontFamily = "Tahoma"; 
            style.fontSize = 12 + "px"; 
        } 
    </script> 
 
    <div id="WelcomeMessage" runat="server" style="position: relative; float: left; width: 48%; 
        height: 30%; left: 1%; top: 1%; margin-right: 1.5%; margin-top: 1%;" visible="false"> 
        <asp:Panel ID="welcomePanel" runat="server" ScrollBars="Auto" GroupingText="Welcome Message" 
            Width="100%" Height="100%" Font-Bold="false"> 
            <asp:Label ID="lbWelcomeMsg" runat="server" Text=""></asp:Label> 
            <br /> 
            <asp:Button ID="btCusotmize" runat="server" Text="Customize Welcome Message" Width="185px" 
                Visible="true" OnClick="btCustomizeWelcomeMsgClick" /> 
            <telerik:RadEditor ID="welcomeEditor" runat="server" Skin="Web20" Width="100%" Height="100%" 
                OnClientLoad="setStyle" Style="overflow: auto" ToolbarMode="Default" EditModes="Design,Preview" 
                ToolsFile="~/ToolsFiles/WelcomeBlockTools.xml"> 
            </telerik:RadEditor> 
            <telerik:RadCodeBlock ID="welcomeCodeBlock" runat="server"> 
 
                <script type="text/javascript"> 
                    //<![CDATA[
                    /* Implementation of the Submit command, declared in the editor's DefaultTools.xml file! */
                    if ("undefined" != typeof (Telerik.Web.UI.Editor)) {
                        Telerik.Web.UI.Editor.CommandList["Submit"] = function(submit, editor, args) {
                            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("updateWelcomeMsg");
                        };
                        /* Implementation of the Cancel command, declared in the editor's DefaultTools.xml file! */
                        Telerik.Web.UI.Editor.CommandList["Cancel"] = function(cancel, editor, args) {
                            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("cancelEditWelcomeMsg");
                        };
                    }
                    //]]> 
                </script> 
 
            </telerik:RadCodeBlock> 
        </asp:Panel> 
    </div> 
    <div id="News" runat="server" style="position: relative; height: 30%; float: left; 
        width: 48%; left: 1%; top: 1%; margin-right: 1.5%; margin-top: 1%; overflow: auto" 
        visible="false"> 
        <asp:Panel ID="newsPanel" runat="server" ScrollBars="Auto" GroupingText="News" Width="100%" 
            Height="100%"> 
            <asp:Label ID="lbNews" runat="server" Text=""></asp:Label> 
            <br /> 
            <asp:Button ID="btPostNews" Text="Post News" runat="server" OnClick="btPostNewsClick" /> 
            <br /> 
            <table id="tblHolder" cellspacing="0" cellpadding="2" border="0" runat="server"> 
                <tr> 
                    <td> 
                        <asp:Label ID="lbNewsExpDt" runat="server" Text="News Expiry Date:" Visible="false"></asp:Label> 
                    </td> 
                    <td> 
                        <asp:TextBox ID="tbNewsExpDt" runat="server" Visible="false"></asp:TextBox> 
                    </td> 
                </tr> 
            </table> 
            <telerik:RadEditor ID="newsEditor" runat="server" Skin="Web20" Width="100%" Height="100%" 
                OnClientLoad="setStyle" Style="overflow: auto" ToolbarMode="Default" EditModes="Design,Preview" 
                ToolsFile="~/ToolsFiles/NewsBlockTools.xml" ToolsWidth="100%"> 
            </telerik:RadEditor> 
            <telerik:RadCodeBlock ID="newsCodeBlock" runat="server"> 
                <script type="text/javascript"> 
                    //<![CDATA[
                    /* Implementation of the CustomRenderedTool command, declared in the NewsBlockTools.xml file! */
                    if ("undefined" != typeof (Telerik.Web.UI.Editor)) {
                        Telerik.Web.UI.Editor.CommandList["CustomRenderedTool"] = function(commandName, editor, oTool) {
                            var linkToPaste = "";
                            var selectionText = editor.get_html();
                            if (selectionText == "") {
                            selectionText = oTool.urlHolder.value;
                            }
                            var reDimension = /^\d+(px|pt)?$/ig;
                            var width = oTool.widthHolder.value;
                            if (!width.match(reDimension)) {
                            alert('Please, provide a valid width!');
                            return;
                            }
                            var height = oTool.heightHolder.value;
                            if (!height.match(reDimension)) {
                            alert('Please, provide a valid height!');
                            return;
                            }
                            var url = oTool.urlHolder.value;
                            if (!url.match(/^(http|file|ftp):\/\//ig)) {
                            alert('Please, provide a valid url!\nUrls should begin with a protocol name, like http://www.telerik.com,');
                            return;
                            }
                            linkToPaste = "<a href=\"#\" onclick=\"javascript:window.open('" + url +
                            "', '_blank', 'width=" + width +
                            ",height=" + height +
                            "');\">" + selectionText + "</a>"
                            editor.PasteHtml(linkToPaste);
                        };
                        /* Implementation of the Post command, declared in the editor's PostNewsTools.xml file! */
                        Telerik.Web.UI.Editor.CommandList["Post"] = function(newsPost, editor, args) {
                            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("postNews");
                        };
                        /* Implementation of the Post command, declared in the editor's PostNewsTools.xml file! */
                        Telerik.Web.UI.Editor.CommandList["Cancel Post"] = function(cancelPost, editor, args) {
                            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("cancelPostNews");
                        };
                    }
                    //]]> 
                </script> 
 
            </telerik:RadCodeBlock> 
        </asp:Panel> 
    </div> 

I did go through the forums and found threads  about using custom tools as well as adding custom controls to radeditor toolbars.But it didnt work for me.The problem that I am facing is rendering the "CustomRenderedTool" from the toolsfile.xml. I does show a icon with a tooltip of "CustomRenderedTool" but when I am trying to initialize Radeditor Tool using RadEditorToolInitializer, it not working fro me...

Here is the sample code that I am using...
Hariharan
Top achievements
Rank 1
 answered on 21 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?