Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
176 views
Hi!

Is there any way to make the spell checker work like the RadSpell Control when using your Html Editor?
Meaning, working like a word like one with the dialog opening up?

I've read in one of your docs that this can be possible by adding the following line to the tools.xml:
<tool name="SpellCheck" />

Instead of:
<tool name="AjaxSpellCheck" />

However it is not working.
A button appears with an exclamtion sign image and when you click on it it says "The command SpellChecker is not implemented yet"

I've tried making a customized button and calling the RadSpell control but I've been having problems when changing back the corrected text.

I'll really appreciate your help on this,
Thanks in advance for your support.

Kind regards
Rumen
Telerik team
 answered on 04 Feb 2011
1 answer
57 views
Hello,

I was trying to implement the code from the following article.
I'm using the server side approach, but i have a problem.

If i expand a parent that has childs and the parent was checked,
When i debug the NodeExpand event handler i see that the e.Node.Checked property of the parent node is always false.
Only if i checked the root parent of the tree i get the desirable result according to my action, the other sub-parents doesn't get it.
protected void RadTreeView1_NodeExpand(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
{
//Debug here
RadTreeNode firstChild = new RadTreeNode("new child1", "new1");
firstChild.Checked = e.Node.Checked; //e.Node.Checked is always false!
}

In other words: I don't get any indication that the parent node is checked.(gets always false).
I tried with tristate mode and without tristate mode. and the CheckChildsNodes property is true.

i use version: 2010.3.1109.35

any ideas??

Thanks,
Oren
Nikolay Tsenkov
Telerik team
 answered on 04 Feb 2011
3 answers
73 views
Hi Telerik,
I need to add Template sentences from database with existing content.What can i do?.
Rumen
Telerik team
 answered on 04 Feb 2011
1 answer
68 views
Hi,
  I'm using telerick Q2version2010 rad controls. My requirement is, In .aspx page  display pencil image only. when I click on pencil image radeditor  window open. previously when I'm using Q2version2008 radcontrol, I display pencil image and click on this image open radeditor as a editible mode. but when I working on new radcontrols(Q2version2010) .  I didn't find how to display pencil (only) image . please give me suggestion how to achieve my requirement.

Advance in Thanks

Thanks
Mr.Perfect
Rumen
Telerik team
 answered on 04 Feb 2011
3 answers
100 views
Hey!

Yesterday I started to research Tooltip's features and definatelly this control is awesome.

I have looked all available tutorials http://demos.telerik.com/aspnet-ajax/tooltip/examples/loadondemand/defaultcs.aspx
And got just a quick question :
<telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="Center"
    RelativeTo="Element" Width="400px" Height="200px" Animation="Resize" HideEvent="LeaveTargetAndToolTip"
    Skin="Default" OnAjaxUpdate="OnAjaxUpdate" OnClientHide="OnClientHide" EnableShadow="true"
    RenderInPageRoot="true" AnimationDuration="200">
</telerik:RadToolTipManager>
Here is RadTooltipManager, but where are <TargetControl> section. I just do not get where did you specified that tooltip should appear on these webControls. :)

Thank you!
Svetlina Anati
Telerik team
 answered on 04 Feb 2011
5 answers
114 views
I define OnClientPageLoad, and setup a simple alert function...but the thing never gets called??

It's a standard telerik:RadWindow with a ContentTemplate definition...
Svetlina Anati
Telerik team
 answered on 04 Feb 2011
13 answers
529 views
This is probably simple but I'm not seeing why this won't work. I have  button on a form declared as:
<asp:button ID="CancelButton" runat="server" OnClick="CancelButton_Click" Text="Cancel" CssClass="btnNormal" OnClientClick="CancelTrainingSessionDialog(this); return false;"/>  
 
 
At the top of the content control, I have this:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
            </telerik:RadWindowManager> 
<telerik:RadCodeBlock ID="JavascriptRadCodeBlock" runat="server">  
 <script type="text/javascript">  
     var cancelMessage = "Are you sure";  
     var cancelTitle = "Cancel Title";  
     function CancelTrainingSessionDialog(cancelButton) {  
         radconfirm(cancelMessage, CancelTrainingSessionCallback);  
     }  
 
     function CancelTrainingSessionCallback(arg, cancelButton) {  
         if (arg == true) {              
             document.getElementById("CancelButton").click();     
         }  
     }  
       
 
      
 
    
 </script> 
</telerik:RadCodeBlock> 

Basically, I want the button to display the confirm and if the result is true, then I would like to process the code behind for the cancel button.
However, when I run this, and click OK in the confirmation dialog box, I get "Microsoft JScript runtime error: 'document.getElementById(...)' is null or not an object".

Any ideas on how to resolve this?
Thanks,
Dennis
Andrew
Top achievements
Rank 1
Veteran
Iron
 answered on 04 Feb 2011
1 answer
105 views
I have a grid and I select an item clientside after binding. I wish to scroll to the selected item. The documentation I have found on the telerik site references row.Control.scrollIntoView which is not (or is no longer) a valid construct.
Vasil
Telerik team
 answered on 04 Feb 2011
1 answer
199 views
I have been using the RadFileExplorer and have been getting on great with it, its a fantastic control. One thing I'm trying to do is add a lot of custom menu items. I have followed code examples on here to achieve this and it all all appears to work well apart from the menu in the tree view. if i right click an item the code uses the node currently selected, not the node i clicked, therefore I have to click the node I want before right clicking it again for the context menu to achieve the results I want, I've looked through the Documentation available online for both the file explorer and tree view but cannot see the client side code to achieve what I want, below is the client side code I currently use, any solution would be greatly appreciated!

function treeContextMenuClicked(toolbar, args) {
        var buttonValue = args.get_menuItem().get_value();
        var fileExplorer = $find("<% = rfeFilesAndFolders.ClientID %>");
        var treeView = fileExplorer.get_tree();
        var fID = treeView.get_selectedNode().get_attributes().getAttribute("FolderId");
        var fType = treeView.get_selectedNode().get_attributes().getAttribute("FolderType");
        var msg = fID + " " + fType
        var isSilverlight = 1;
         
        if (buttonValue == "share" && fType == 2) {
            var sURL = '<%=session("webbase") %>Share/' + fID + '/Add'
            var owindow = radopen(sURL, null);
            owindow.SetTitle('Share Object');
            owindow.SetSize(530, 360);
            owindow.Center();
            return false;
        }
Dobromir
Telerik team
 answered on 04 Feb 2011
1 answer
187 views
HI All,

I am facing some issues while rad window closing process. Please find my requirement below....

i have one rad grid which is using to export excel file to DB. and i am using superate aspx page to open this as for window.now i want ot know how can i close widow after completing the uploading process.i want to know that my code is in C# Code behind.
here is my code:
distribute.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DistributeDialog.aspx.cs"
    Inherits="DistributeDialog" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Distribute Activation Codes</title>
    <link href="~/style/styles.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../style/Authentication.css" />
    <link href="~/style/styles.css" rel="stylesheet" type="text/css" />

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>

    <style type="text/css">
        html, body, form
        {
            padding: 0;
            margin: 0;
            height: 100%;
            background: #f2f2de;
        }
        body
        {
            font: normal 11px Arial, Verdana, Sans-serif;
        }
        fieldset
        {
            height: 200px;
        }
        * + html fieldset
        {
            height: 168px;
            width: 268px;
        }
    </style>
</head>
<body>
    <form id="formDistributeDialog" method="post" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" DecoratedControls="All" runat="server"
        Skin="Sunset" />

    <script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }


        //fix for Chrome/Safari due to absolute positioned popup not counted as part of the content page layout
        function ChromeSafariFix(oWindow) {
            var iframe = oWindow.get_contentFrame();
            var body = iframe.contentWindow.document.body;

            setTimeout(function() {
                var height = body.scrollHeight;
                var width = body.scrollWidth;

                var iframeBounds = $telerik.getBounds(iframe);
                var heightDelta = height - iframeBounds.height;
                var widthDelta = width - iframeBounds.width;

                if (heightDelta > 0) oWindow.set_height(oWindow.get_height() + heightDelta);
                if (widthDelta > 0) oWindow.set_width(oWindow.get_width() + widthDelta);
                oWindow.center();
            }, 310);
        }
        

    </script>

    <div style="width: 268px; height: 193px;">
        <br />
        <br />
        <asp:Label ID="lblUpload" runat="server" Text="File upload:"></asp:Label>
        <asp:FileUpload ID="FlUpload" runat="server" /><%--<asp:Image ID="imgDownloadInfo" runat="server"
                ImageUrl="~/Images/Help.png" />--%>
        <asp:Label runat="server" CssClass="lbl_errormsg_visible" Text="" ID="lblGenerationCodes"
            Visible="false"></asp:Label>
        <asp:RequiredFieldValidator ID="rfvUpload" Display="Dynamic" ControlToValidate="FlUpload"
            ErrorMessage="Please select file!" Font-Names="Arial" Font-Size="11" runat="server"
            ValidationGroup="update">
        </asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="revFileUpLoadValidator" runat="server" ErrorMessage="Only (xls) allowed "
            ValidationExpression="(.*\.xlsx)|(.*\.xls)" Display="Dynamic" ControlToValidate="FlUpload"
            ValidationGroup="update">
        </asp:RegularExpressionValidator>
        <div style="margin: 20px 0 0 0;">
            <div style="float: left; margin: 6px 0 0 18px;">
                <asp:CheckBox ID="chkSendMail" runat="server" Text="Send emails to users" />
            </div>
        </div>
        <div style="margin-top: 4px; text-align: right;">
            <asp:Button ID="btnUpdate" runat="server" Text="Bulk Distribute" ValidationGroup="update"
                OnClick="ExportExcelToSQL_onclik" />
            <%--<input type="button" value="Cancel" onclick="" />--%>
        </div>
        <asp:TextBox ID="txtCompID" runat="server" Style="display: none;"></asp:TextBox>
    </div>
    </form>
</body>
</html>

Distribute.aspx.cs:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Xml;
using System.Net;
using System.IO;
using Microsoft.Office.Interop;
using Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Text;

public partial class DistributeDialog : System.Web.UI.Page
{
    System.Data.DataTable dt = new System.Data.DataTable("dtExcel");
    protected void Page_Load(object sender, EventArgs e)
    {
        string url = HttpContext.Current.Request.RawUrl;
        if (CommonSession.CurrentUserId == null)
        {
            Response.Redirect("~\\Login\\Login.aspx");
        }
        else
        {
            if (url.IndexOf("?") == -1)
            {
                Response.Redirect("~\\Login\\login.aspx");
            }
            else
            {
                if (CommonSession.CurrentUserRole == "Superadmin")
                {
                   txtCompID.Text = Request.QueryString["companyID"].ToString();
                }
                else
                {
                    txtCompID.Text = CommonSession.CurrentUserCompanyId.ToString();
                }
            }
        }
    }
    protected void ExportExcelToSQL_onclik(object sender, EventArgs e)
    {
           try
            {
                formDistributeDialog.Disabled = true;
                lblGenerationCodes.Visible = false;
                string SendmailToUsers;
                File.Delete(Server.MapPath(@"~\Forms\TempFileUpload\") + FlUpload.FileName);
                string Filename = Server.MapPath(@"~\Forms\TempFileUpload\") + FlUpload.FileName;
                FlUpload.SaveAs(Filename);

                    string Ext = FlUpload.FileName.Substring(FlUpload.FileName.LastIndexOf(".") + 1);
                    string SheetName = FlUpload.FileName;
                    SheetName = SheetName.Replace(".xlsx", "");
                    SheetName = SheetName.Replace(".xls", "");
                    string ExceCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= " + Filename + "; Extended Properties=Excel 8.0";                    
                    System.Data.OleDb.OleDbConnection excelConnection = new System.Data.OleDb.OleDbConnection(ExceCon);
                    excelConnection.Open();       
                    string OleStr = "SELECT * INTO [ODBC; " + ConfigurationManager.AppSettings["AONConnectionString"].ToString() + " ].[" + SheetName + "]   FROM [" + SheetName + "$]\"";
                    System.Data.OleDb.OleDbCommand excelCommand = new System.Data.OleDb.OleDbCommand(OleStr, excelConnection);
                    excelCommand.ExecuteNonQuery();
                    excelConnection.Close();
                    WebClient webClient = new WebClient();

                    if (chkSendMail.Checked == true)
                    {
                        SendmailToUsers = "true";
                    }
                    else
                    {
                        SendmailToUsers = "false";
                    }
                    string overview = webClient.DownloadString(string.Concat(ConfigurationManager.AppSettings["AONServiceURL"].ToString(), "/UpdateActivationCodeInfoResult/", SheetName, "/", SendmailToUsers,"/", CommonSession.CurrentUserId.ToString(), "/", CommonSession.CurrentUserCompanyId.ToString()));
                    File.Delete(Server.MapPath(@"~\Forms\TempFileUpload\") + FlUpload.FileName);
                    if (chkSendMail.Checked == true)
                    {
                        lblGenerationCodes.Text = "File Uploaded Successfully & Mails Sent Successfully ";
                        lblGenerationCodes.Visible = true;
                    }
                    else
                    {
                        lblGenerationCodes.Text = "File Uploaded Successfully";
                        lblGenerationCodes.Visible = true;
                        
                    }
                    GetRadWindowCloseScript();
                    
            }
            catch (Exception ex)
            {
                lblGenerationCodes.Text = ex.Message;
                lblGenerationCodes.Visible = true;
                formDistributeDialog.Disabled = false;               
            }
          

        
    }
    public static string GetRadWindowCloseScript()
    {
        return @"
            <script type='text/javascript'>
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if(window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                var currentWindow = oWindow;
                currentWindow.Close();
            </script>";
    }  
   
}
I am trying to accesing this as rad widow.fid that code in below;

 <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
        ReloadOnShow="true" runat="server" Skin="Office2007" EnableShadow="true">
        <Windows>
                 <telerik:RadWindow ID="DistributeWindow" Height="250px" Width="400px" Modal="true"
                runat="server" Behaviors="Close" NavigateUrl="~/Forms/DistributeDialog.aspx"
                OnClientClose="reBindCompanyOverviewPage">
            </telerik:RadWindow>
           
        </Windows>
    </telerik:RadWindowManager>

now i want to close these windows after completion of  My Export process.

PLease do me need full as soon as posible.
Georgi Tunev
Telerik team
 answered on 04 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?