Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
106 views
Hi Guys,

I seem to have come across an issue where I'm not displayed any of the paging information when setting the explorermode of a fileexplorer.

If I remove ExplorerMode then I can see the page numbers and number of items. If I add ExplorerMode then this information disappears.

Is this something you are aware of or is there something else I can do to display this information?


Thanks.
Dobromir
Telerik team
 answered on 17 May 2012
1 answer
178 views
Hi,

I have the below show MasterViewtable and NestedViewtable in my radgrid...



 STEP 1 -   I have attached textchanged event for all nestedview textboxes in OnItemCreated

 protected void rdgEmployee_OnItemCreated(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridNestedViewItem)
            {
                GridNestedViewItem item = (GridNestedViewItem)e.Item;

                //MeritPerc
                RadNumericTextBox txtPropIncrease = (RadNumericTextBox)item.FindControl("txtPropIncrease");
                txtPropIncrease.TextChanged += new EventHandler(txtPropIncrease_TextChanged);
            }
        }

 STEP 2 - On the nesteview textbox textchanged event, i am getting griddataitem and manipulating my data based on that item.

protected void txtPropIncrease_TextChanged(object sender, EventArgs e)
        {
            RadNumericTextBox txtPropIncrease = sender as RadNumericTextBox;
            GridNestedViewItem Childitem = (GridNestedViewItem)txtPropIncrease.NamingContainer;
            GridDataItem parentItem = Childitem.ParentItem;

            CalculateCompensationByComponent(parentItem, GridOperationType.MeritPercent, txtPropIncrease);
        }


 PROBLEM :   When i change the first textbox value, the respected textbox extchanged event calling,  but after changing first textbox value, i am trying to change the second textbox value, its suppose to call the second textbox textchanged event, its doing as expected, but it calling first textbox textchanged event before calling the its respected ( second textbox ) textchanged event.

Could you please help on this ?  Why its calling the first textbox change event, even though i didn't change the value of it. ?
Vasil
Telerik team
 answered on 17 May 2012
1 answer
86 views
Is it possible to get a div inside the treeview control such that i get the entire tree and below that i get a link. I want it in the same control so that if there are scrollbars for the treeview the link should scroll along with the treeview, like a custom temlated control. so its structure should be something like : 
<div id="myRadTree">
<ul class="rtUL">
        <li class="rtLI rtFirst">
            <div class="rtTop">
                <span class="rtSp"></span>
                <img class="rtImg" alt="" src="Images/Add2Favs_16.png"><span class="rtIn" title="mev3\10000 Folders">10000
                    Folders (mev3)</span></div>
        </li>
        <li class="rtLI rtLast">
            <div class="rtBot">
                <span class="rtSp"></span>
                <img class="rtImg" alt="" src="Images/Add2Favs_16.png"><span class="rtIn" title="mev3\Deleted Items">Deleted
                    Items (mev3)</span></div>
        </li>
</ul>
<div>
<a href="">Link here</a>
</div>
</div>
Plamen
Telerik team
 answered on 17 May 2012
4 answers
172 views
I have a page which has radscriptmanager and radajaxmanager onto it. On the same page i have put the code to handle window.resize. The handler works for all the browser, but when i am zooming in IE8 this event is not called. This behavior is observed when i keep radajaxmanager on the page, when i remove this, even in IE8 it works properly. Please find the code below : 

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>


<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script language="javascript" type="text/javascript">
        window.onresize = showresize;
        function showresize() {
            alert('Window Resized');
        };
    </script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    
    <Scripts>
        <asp:ScriptReference Assembly="Telerik.Web.UI" 
            Name="Telerik.Web.UI.Common.Core.js">
        </asp:ScriptReference>
        <asp:ScriptReference Assembly="Telerik.Web.UI" 
            Name="Telerik.Web.UI.Common.jQuery.js">
        </asp:ScriptReference>
        <asp:ScriptReference Assembly="Telerik.Web.UI" 
            Name="Telerik.Web.UI.Common.jQueryInclude.js">
        </asp:ScriptReference>
    </Scripts>
</telerik:RadScriptManager>
<telerik:RadAjaxManager runat="server" ID="ShellAjaxManager" RequestQueueSize="3"  />
    <h2>
        Welcome to ASP.NET!
    </h2>
</asp:Content>

Can you please let me know what i am missing, because this is really strange.
Maria Ilieva
Telerik team
 answered on 17 May 2012
2 answers
108 views
Hi,
Is it possible to transfer items from one radlistbox to another by using OnTransferring server event of Radlistbox with its inbuilt transfer buttons?
Can you provide me some samples about this scenario?

Thanks and Regards,
Santhosh Naik




Santhosh
Top achievements
Rank 1
 answered on 17 May 2012
1 answer
105 views
I use this code to display html text from sql database in rad editor now i want to paste the text with the color , bold to word document.
The words paste normal as text not with any colors or bold text just plain texted

This is the code what i use.
Paragraph heading3 = new Paragraph();
                                    Run heading_run3 = new Run();
                                    Text heading_text3 = new Text(name);
                                    ParagraphProperties heading_pPr3 = new ParagraphProperties();
                                    // we set the style
                                    heading_pPr3.ParagraphStyleId = new ParagraphStyleId() { Val = "Heading" + num.ToString() };
                                    heading3.Append(heading_pPr3);
                                    heading_run3.Append(heading_text3);
                                    heading3.Append(heading_run3);

                                    
                                    wordDoc.MainDocumentPart.Document.Body.Append(heading3);
                                    if (CheckBox1.Checked == true)
                                    {
                                            ///Add Proposal Description to Document
                                            string html2 = drvSql["Sales_Description"].ToString();
                                            //string id = drvSql["Treeselectedid"].ToString();
                                            RadEditor2.Content = html2;
                                            string t;

                                            StringWriter sw = new System.IO.StringWriter();

                                            
                                            t = RadEditor2.Text;
                                           
                                            Paragraph heading2 = new Paragraph();
                                            Run heading_run2 = new Run();
                                            Text heading_text2 = new Text(t);
                                            ParagraphProperties heading_pPr2 = new ParagraphProperties();
                                            //// we set the style
                                            heading_pPr2.ParagraphStyleId = new ParagraphStyleId() { Val = "Indent" + num.ToString() };
                                            heading2.Append(heading_pPr2);
                                            heading_run2.Append(heading_text2);
                                            heading2.Append(heading_run2);
                                            wordDoc.MainDocumentPart.Document.Body.Append(heading2);
                       
                                    }

Rumen
Telerik team
 answered on 17 May 2012
1 answer
145 views
I am getting a NullReferenceException when exporting my grid to Excel.  It happens when I am referencing a button that exists in a GridTemplateColumn.  I am setting the BackColor of the GridTableCell the button exists in and the CommandArgument of the button in the ItemDataBound event of the grid.

These are the lines I get the exception on.
((GridTableCell)btn.Parent).BackColor = System.Drawing.Color.Red;
btn.CommandArgument = "etid=" + drv["JOC_Event_Ticket_ID"] + "&ttype=" + drv["Ticket_Type_ID"];

Is there a way to get around this when exporting to Excel?
int ticket_number = int.Parse(DataBinder.Eval(e.Item.DataItem, "Ticket").ToString());
                if (Ticket_number > 0)
                {
                    if (ticket_number > 0)
                    {
                        e.Item.Cells[13].BackColor = System.Drawing.Color.Red;
                        ((GridTableCell)btn.Parent).BackColor = System.Drawing.Color.Red;
                    }
                    if (drv["JOC_Event_Ticket_ID"].ToString().Length > 0)
                    {
                        btn.CommandArgument = "etid=" + drv["JOC_Event_Ticket_ID"] + "&ttype=" + drv["Ticket_Type_ID"];
                    }
                    else
                    {
                        btn.CommandArgument = "problem_no=" + drv["Ticket"] + "&ttype=1"; // +drv["Ticket_Type_ID"];
                    }
                }


Thanks,
Steven
Daniel
Telerik team
 answered on 17 May 2012
0 answers
94 views
I using a javascript for type farsi (persian) language in textbox field. I add [lang="fa"] to textbox and include my java script file in aspx file
then i can type farsi in text box. but when i refresh or postback my page using radajaxpanel my script not working
see my code and please help me.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <script src="FarsiType.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <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">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Top">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ajaxsettings>
            <telerik:AjaxSetting AjaxControlID="button1" >
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </ajaxsettings>
    </telerik:RadAjaxManager>
    <asp:Button Text="refresh panel1" runat="server" ID="button1" />
    <asp:Panel ID="Panel1" runat="server" BackColor="Yellow">
        <p>
            panel1
        </p>
        textbox inside AjaxLoadingPanel:
        <asp:TextBox runat="server" lang="fa" ID="TextBox2" Font-Names="tahoma" />
        <br />
        <br />
    </asp:Panel>
    <p>
    </p>
    <hr />
    <asp:Panel ID="Panel2" runat="server" BackColor="Green">
        <p>
            panel2
        </p>
        textbox outside adAjaxLoadingPanel:
        <asp:TextBox ID="TextBox1" runat="server" lang="fa" Font-Names="tahoma" />
        <br />
        <br />
    </asp:Panel>
    <asp:Button Text="postback page" runat="server" ID="button2" />
    </form>
</body>
</html>

and my script file is : (Farsitype.js)
/*
FarsiType
Version: 1.3.6
 
This script developed to ease typing Farsi (Persian) in web forms where there is no Farsi Keyboard installed on a PC.
Works with Internet Explorer, FireFox, Opera and Chrome.
For more information and getting the using manual please visit the script website (http://www.farsitype.ir).
 
Copyright 2002-2011  Kaveh Ahmadi  (http://www.kavehahmadi.com, email: me@kavehahmadi.com).
Licensed under the GPL (http://www.opensource.org/licenses/gpl-license.php) license.
*/
 
// insertAdjacentHTML(), insertAdjacentText() and insertAdjacentElement() for Netscape 6/Mozilla by Thor Larholm me@jscript.dk
if (typeof HTMLElement!="undefined" && ! HTMLElement.prototype.insertAdjacentElement) {
    HTMLElement.prototype.insertAdjacentElement = function (where,parsedNode) {
        switch (where) {
            case 'beforeBegin':
                this.parentNode.insertBefore(parsedNode,this)
                break;
            case 'afterBegin':
                this.insertBefore(parsedNode,this.firstChild);
                break;
            case 'beforeEnd':
                this.appendChild(parsedNode);
                break;
            case 'afterEnd':
                if (this.nextSibling)
                    this.parentNode.insertBefore(parsedNode,this.nextSibling);
                else
                    this.parentNode.appendChild(parsedNode);
                break;
        }
    }
 
    HTMLElement.prototype.insertAdjacentHTML = function (where,htmlStr) {
        var r = this.ownerDocument.createRange();
        r.setStartBefore(this);
        var parsedHTML = r.createContextualFragment(htmlStr);
        this.insertAdjacentElement(where,parsedHTML)
    }
 
    HTMLElement.prototype.insertAdjacentText = function (where,txtStr) {
        var parsedText = document.createTextNode(txtStr)
        this.insertAdjacentElement(where,parsedText)
    }
}
 
var FarsiType = {
    // Farsi keyboard map based on Iran Popular Keyboard Layout
    farsiKey: [
        32, 33, 34, 35, 36, 37, 1548,   1711,
        41, 40, 215,    43, 1608,   45, 46, 47,
        48, 49, 50, 51, 52, 53, 54, 55,
        56, 57, 58, 1705,   44, 61, 46, 1567,
        64, 1616,   1584,   125,    1609,   1615,   1609,   1604,
        1570,   247,    1600,   1548,   47, 8217,   1583,   215,
        1563,   1614,   1569,   1613,   1601,   8216,   123,    1611,
        1618,   1573,   126,    1580,   1688,   1670,   94, 95,
        1662,   1588,   1584,   1586,   1740,   1579,   1576,   1604,
        1575,   1607,   1578,   1606,   1605,   1574,   1583,   1582,
        1581,   1590,   1602,   1587,   1601,   1593,   1585,   1589,
        1591,   1594,   1592,   60, 124,    62, 1617
    ],
    Type: true,
    counter: 0,
    ShowChangeLangButton: 1,    // 0: Hidden / 1: Visible
    KeyBoardError: 0,           // 0: Disable FarsiType / 1: Show Error
    ChangeDir: 2,           // 0: No Action / 1: Do Rtl-Ltr / 2: Rtl-Ltr button
    UnSupportedAction: 0        //0: Disable FarsiType / 1: Low Support
}
 
FarsiType.enable_disable = function(Dis) {
    var invis, obj;
     
    if (!Dis.checked)  {
        FarsiType.Type = true;
        disable = false;
        color = 'darkblue';
    } else {
        FarsiType.Type = false;
        disable = true;
        color = '#ECE9D8';
    }
 
    if (FarsiType.ShowChangeLangButton == 1) {
        for (var i=1; i<= FarsiType.counter; i++) {
            obj = document.getElementById('FarsiType_button_' + i);
            obj.disabled = disable;
            obj.style.backgroundColor = color;
        }
    }
}
 
FarsiType.Disable = function() {
    FarsiType.Type = false;
    var Dis = document.getElementById('disableFarsiType')
    if (Dis != null) {
        Dis.checked = true;
    }
 
    if (FarsiType.ShowChangeLangButton == 1) {
        for (var i=1; i<= FarsiType.counter; i++) {
            obj = document.getElementById('FarsiType_button_' + i);
            obj.disabled = true;
            obj.style.backgroundColor = '#ECE9D8';
        }
    }
}
 
FarsiType.init = function() {
 
    var Inputs = document.getElementsByTagName('INPUT');
    for (var i=0; i<Inputs.length; i++) {
        if (Inputs[i].type.toLowerCase() == 'text' && (Inputs[i].lang.toLowerCase() == 'fa' || Inputs[i].lang.toLowerCase() == 'fa-ir')) {
            FarsiType.counter++;
            new FarsiType.KeyObject(Inputs[i], FarsiType.counter);
        }
    }
 
    var Areas = document.getElementsByTagName('TEXTAREA');
    for (var i=0; i<Areas.length; i++) {
        if (Areas[i].lang.toLowerCase() == 'fa' || Areas[i].lang.toLowerCase() == 'fa-ir') {
            FarsiType.counter++;
            new FarsiType.KeyObject(Areas[i], FarsiType.counter);
        }
    }
     
    var Dis = document.getElementById('disableFarsiType')
    if (Dis != null) {
        FarsiType.enable_disable (Dis);
        Dis.onclick = new Function( "FarsiType.enable_disable (this);" )
    }
}
 
FarsiType.KeyObject = function(z,x) {
 
    GenerateStr = "";
    if (FarsiType.ShowChangeLangButton == 1) {
        GenerateStr = GenerateStr + "<input type='button' id=FarsiType_button_"+x+" style='border: none; background-color:darkblue; font-size:11; color:white; font-family:tahoma; padding: 1px; margin: 1px; width: auto; height: auto;' value='FA' /> ";
    }
    if (FarsiType.ChangeDir == 2) {
        GenerateStr = GenerateStr  + "<input type='button' id=FarsiType_ChangeDir_"+x+" style='border: none; background-color:darkblue; font-size:11; color:white; font-family:tahoma; padding: 1px; margin: 1px; width: auto; height: auto;' value='RTL' />"
    }
    z.insertAdjacentHTML("afterEnd", GenerateStr);
 
    if (FarsiType.ShowChangeLangButton == 1) {
        z.bottelm = document.getElementById ('FarsiType_button_' + x);
        z.bottelm.title = 'Change lang to english';
    }
    if (FarsiType.ChangeDir == 2) {
        z.Direlm = document.getElementById ('FarsiType_ChangeDir_' + x);
    }
 
    z.farsi = true;
    z.dir = "rtl";
    z.align = "right";
 
    z.style.textAlign = z.align;
    z.style.direction = z.dir;
 
    setSelectionRange = function(input, selectionStart, selectionEnd) {
        input.focus()
        input.setSelectionRange(selectionStart, selectionEnd)
    }
 
    ChangeDirection = function() {
        if (z.dir == "rtl") {
            z.dir = "ltr";
            z.align = "left";
            z.Direlm.value = "LTR";
            z.Direlm.title = "Change direction: Right to Left"
        } else {
            z.dir = "rtl";
            z.align = "right";
            z.Direlm.value = "RTL";
            z.Direlm.title = "Change direction: Left to Right"
        }
        z.style.textAlign = z.align;
        z.style.direction = z.dir;
        z.focus();
    }
 
    ChangeLang = function(e, ze) {
        if(ze)
            z = ze;
 
        if (FarsiType.Type) {
            if (z.farsi) {
                z.farsi = false;
                if (FarsiType.ShowChangeLangButton == 1) {
                    z.bottelm.value = "EN";
                    z.bottelm.title = 'Change lang to persian';
                }
                if (FarsiType.ChangeDir == 1) {
                    z.style.textAlign = "left";
                    z.style.direction = "ltr";
                }
            } else {
                z.farsi = true;
                if (FarsiType.ShowChangeLangButton == 1) {
                    z.bottelm.value = "FA";
                    z.bottelm.title = 'Change lang to english';
                }
                if (FarsiType.ChangeDir == 1) {
                    z.style.textAlign = "right";
                    z.style.direction = "rtl";
                }
            }
            z.focus();
        }
         
        if (e.preventDefault) e.preventDefault();
        e.returnValue = false;
        return false;
    }
 
    Convert = function(e) {
 
        if (e == null)
            e = window.event;
 
        var key = e.which || e.charCode || e.keyCode;
        var eElement = e.target || e.originalTarget || e.srcElement;
 
        if (e.ctrlKey && key == 32) {
            ChangeLang(e, z);
        }
 
        if (FarsiType.Type) {
            if (
                (e.charCode != null && e.charCode != key) ||
                (e.which != null && e.which != key) ||
                (e.ctrlKey || e.altKey || e.metaKey) ||
                (key == 13 || key == 27 || key == 8)
            ) return true;
 
            //check windows lang
            if (key > 128) {
                if (FarsiType.KeyBoardError == 0) {
                    FarsiType.Disable();
                } else {
                    alert("Please change your windows language to English");
                    return false;
                }
            }
 
            // If Farsi
            if (FarsiType.Type && z.farsi) {
 
                //check CpasLock
                if ((key >= 65 && key <= 90&& !e.shiftKey) || (key >= 97 && key <= 122 ) && e.shiftKey) {
                    alert("Caps Lock is On. To prevent entering farsi incorrectly, you should press Caps Lock to turn it off.");
                    return false;
                }
 
                // Shift-space -> ZWNJ
                if (key == 32 && e.shiftKey)
                    key = 8204;
                else
                    key = FarsiType.farsiKey[key-32];
 
                key = typeof key == 'string' ? key : String.fromCharCode(key);
 
                // to farsi
                try {
                 
                    var docSelection = document.selection;
                    var selectionStart = eElement.selectionStart;
                    var selectionEnd = eElement.selectionEnd;
 
                    if (typeof selectionStart == 'number') {
                        //FOR W3C STANDARD BROWSERS
                        var nScrollTop = eElement.scrollTop;
                        var nScrollLeft = eElement.scrollLeft;
                        var nScrollWidth = eElement.scrollWidth;
     
                        eElement.value = eElement.value.substring(0, selectionStart) + key + eElement.value.substring(selectionEnd);
                        setSelectionRange(eElement, selectionStart + key.length, selectionStart + key.length);
         
                        var nW = eElement.scrollWidth - nScrollWidth;
                        if (eElement.scrollTop == 0) { eElement.scrollTop = nScrollTop }
                    } else if (docSelection) {
                        var nRange = docSelection.createRange();
                        nRange.text = key;
                        nRange.setEndPoint('StartToEnd', nRange);
                        nRange.select();
                    }
     
                } catch(error) {
                    try {
                        // IE
                        e.keyCode = key
                    } catch(error) {
                        try {
                            // OLD GECKO
                            e.initKeyEvent("keypress", true, true, document.defaultView, false, false, true, false, 0, key, eElement);
                        } catch(error) {
                            //OTHERWISE
                            if (FarsiType.UnSupportedAction == 0) {
                                alert('Sorry! no FarsiType support')
                                FarsiType.Disable();
                                var Dis = document.getElementById('disableFarsiType')
                                if (Dis != null) {
                                    Dis.disabled = true;
                                }
                                return false;
                            } else {
                                eElement.value += key;                 
                            }
                        }
                    }
                }
 
                if (e.preventDefault)
                    e.preventDefault();
                e.returnValue = false;
            }
        }
        return true;
    }
 
    if (FarsiType.ShowChangeLangButton == 1) { z.bottelm.onmouseup = ChangeLang; }
    if (FarsiType.ChangeDir == 2) { z.Direlm.onmouseup = ChangeDirection; }
    z.onkeypress = Convert;
}
 
if (window.attachEvent) {
    window.attachEvent('onload', FarsiType.init)
} else if (window.addEventListener) {
    window.addEventListener('load', FarsiType.init, false)
}
Jamal Roshan
Top achievements
Rank 2
 asked on 17 May 2012
1 answer
161 views
I need show RadListBox with heigth = 100%
I try some css but does not work.
I have the same problem with Radgrid.

I see like this:


I need like this:


this is my code:

.css
div#container  { height:100%; width:100%; position: absolute;  display: block;}
div#leftContainer  { height:100%; width:25%; float:left;  }
div#middleContainer  { height:100%; width:25%;   float:left;}
div#rightContainer  { height:100%; width:40%;  float:left;  }

.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DocumentTypeForm.aspx.cs"
    Inherits="WebSearch.UI.Admin.DocumentTypeForm" %>

<!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 runat="server">
   
    <link href="../Style/Admin/DocumentType.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .listBoxHeaders
        {
            color: Green;
            font-weight: bold;
        }
        
        
        
        
        .RadListBox span.rlbText em
        {
            background-color: #E5E5E5;
            font-weight: bold;
            font-style: normal;
        }
        
        .rbClear
        {
            background-image: url(/UI/Images/cross.png);
            background-position: center;
            background-repeat: no-repeat;
        }
    </style>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">

            function confirmCallBackFn(arg) {

                var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                if (arg == true)
                { ajaxManager.ajaxRequest("Remove"); }

            }

            function CloseAndRebind(args) {

                GetRadWindow().BrowserWindow.refreshGrid(args);
                GetRadWindow().close();
            }

            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

                return oWindow;
            }

            function CancelEdit() {
                GetRadWindow().close();
            }



                   
        </script>
    </telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager2" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script type="text/javascript">

            function filterList() {
                var listbox = $find("<%= rlbAvailable.ClientID %>");
                var textbox = $find('<%= tbAvailableFilter.ClientID %>');

                clearListEmphasis(listbox);
                createMatchingList(listbox, textbox.get_textBoxValue());
            }

            // Remove emphasis from matching text in ListBox
            function clearListEmphasis(listbox) {
                var re = new RegExp("</{0,1}em>", "gi");
                var items = listbox.get_items();
                var itemText;

                items.forEach
                (
                    function (item) {
                        itemText = item.get_text();
                        item.set_text(itemText.replace(re, ""));
                    }
                )
            }

            // Emphasize matching text in ListBox and hide non-matching items
            function createMatchingList(listbox, filterText) {
                if (filterText != "") {
                    filterText = escapeRegExCharacters(filterText);

                    var items = listbox.get_items();
                    var re = new RegExp(filterText, "i");

                    items.forEach
                    (
                        function (item) {
                            var itemText = item.get_text();

                            if (itemText.match(re)) {
                                item.set_text(itemText.replace(re, "<em>" + itemText.match(re) + "</em>"));
                                item.set_visible(true);
                            }
                            else {
                                item.set_visible(false);
                            }
                        }
                    )
                }
                else {
                    var items = listbox.get_items();

                    items.forEach
                    (
                        function (item) {
                            item.set_visible(true);
                        }
                    )
                }
            }

            function rlbAvailable_OnClientTransferring(sender, eventArgs) {
                // Transferred items retain the emphasized text, so it needs to be cleared.
                clearListEmphasis(sender);
                // Clear the list. Optional, but prevents follow up situation.
                clearFilterText();
                createMatchingList(sender, "");
            }

            function rbtnClear_OnClientClicking(sender, eventArgs) {
                clearFilterText();

                var listbox = $find("<%= rlbAvailable.ClientID %>");

                clearListEmphasis(listbox);
                createMatchingList(listbox, "");
            }

            // Clears the text from the filter.
            function clearFilterText() {
                var textbox = $find('<%= tbAvailableFilter.ClientID %>');
                textbox.clear();
            }

            // Escapes RegEx character classes and shorthand characters
            function escapeRegExCharacters(text) {
                return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
            }

        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxLoadingPanel runat="server" Skin="Vista" ID="LoadCombo" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rlbChosen">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="litnow" LoadingPanelID="LoadginPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <div class="TabContainer">
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Vista" MultiPageID="RadMultiPage1"
            SelectedIndex="0" CssClass="tabStrip" Width="698px">
            <Tabs>
                <telerik:RadTab Value="Information">
                </telerik:RadTab>
                <telerik:RadTab Value="Fields">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" CssClass="multiPage">
            <telerik:RadPageView ID="RadPageViewInformation" runat="server" Width="100%">
                <div class="TabTitle">
                    <asp:Label ID="lblTitleTab1" runat="server"></asp:Label>
                </div>
                <asp:Table ID="Table3" CssClass="EditFormTable" runat="server">
                    <asp:TableRow>
                        <asp:TableCell CssClass="CellLabelLTW">
                            <asp:Label runat="server" ID="lblName" CssClass="fontLabel" /></asp:TableCell><asp:TableCell
                                CssClass="CellTextBoxL">
                                <asp:TextBox ID="txtName" MaxLength="250" CssClass="TextBoxPopUp" Text='<%# Bind("Name") %>'
                                    runat="server">
                                </asp:TextBox><asp:RequiredFieldValidator ID="rfFirstName" runat="server" ErrorMessage="*"
                                    ControlToValidate="txtName" CssClass="validator" ValidationGroup="Information" />
                                <asp:CustomValidator ID="cvName" runat="server" ValidationGroup="Information" CssClass="validator"
                                    ControlToValidate="txtName" OnServerValidate="cvName_OnServerValidate" />
                            </asp:TableCell>
                        <asp:TableCell CssClass="CellLabelRTW" />
                        <asp:TableCell CssClass="CellTextBoxR" />
                    </asp:TableRow>
                    <asp:TableRow>
                        <asp:TableCell CssClass="CellLabelLTW">
                            <asp:Label runat="server" ID="lblDescription" CssClass="fontLabel" /></asp:TableCell><asp:TableCell
                                CssClass="CellTextBoxL">
                                <asp:TextBox ID="txtDescription" MaxLength="250" CssClass="TextBoxPopUp" Text='<%# Bind("Description") %>'
                                    runat="server">
                                </asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                    ErrorMessage="*" ControlToValidate="txtName" CssClass="validator" ValidationGroup="Information" />
                            </asp:TableCell>
                        <asp:TableCell CssClass="CellLabelRTW" />
                        <asp:TableCell CssClass="CellTextBoxR" />
                    </asp:TableRow>
                </asp:Table>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageViewField" runat="server" Width="100%" >
                <div class="TabTitle">
                    <asp:Label ID="lblFields" runat="server"></asp:Label>
                </div>
                <div class="listBoxHeaders">
                    <span style="margin-left: 50px;">
                        <asp:Literal runat="server" ID="litAvailable" />
                    </span><span style="margin-left: 136px;">
                        <asp:Literal runat="server" ID="litOnDcumentType" /></span> <span style="margin-left: 200px">
                            Properties </span>
                </div>
                <div>
                    <table style="position: relative; left: -3px; margin-bottom: 2px;">
                        <tr>
                            <td>
                                <telerik:RadTextBox ID="tbAvailableFilter" runat="server" Width="187px" autocomplete="on"
                                    onkeyup="filterList();" />
                            </td>
                            <td>
                                <telerik:RadButton ID="rbtnClear" runat="server" Width="22px" AutoPostBack="false"
                                    OnClientClicking="rbtnClear_OnClientClicking">
                                    <Icon PrimaryIconCssClass="rbClear" />
                                </telerik:RadButton>
                            </td>
                        </tr>
                    </table>
                </div>
                <div id="container">
                    <div id="leftContainer">
                        <telerik:RadListBox ID="rlbAvailable" runat="server" Width="100%" AllowTransfer="true"
                            AllowTransferOnDoubleClick="true" TransferToID="rlbChosen" SelectionMode="Multiple"
                            EnableDragAndDrop="true" AllowReorder="true" DataTextField="Header" DataValueField="Id"
                            Sort="Ascending" OnClientTransferring="rlbAvailable_OnClientTransferring" ButtonSettings-ShowTransferAll="true">
                        </telerik:RadListBox>
                    </div>
                    <div id="middleContainer">
                        <telerik:RadListBox ID="rlbChosen" runat="server" Sort="Ascending" Width="100%" AutoPostBack="true"
                            OnSelectedIndexChanged="rlbChosen_SelectedIndexChange" SelectionMode="Multiple"
                            EnableDragAndDrop="true" AllowReorder="true" DataTextField="Header" DataValueField="Id">
                        </telerik:RadListBox>
                    </div>
                <div id="rightContainer">
                         <div> <asp:Label ID="lblDataTypeLabel" runat="server"></asp:Label>
                          <asp:Label ID="lblDataType" runat="server"></asp:Label>
                          </div>
                       
                    
                     <%-- <telerik:RadTabStrip ID="RadTabStrip2" runat="server" Skin="Vista" MultiPageID="RadMultiPage2"
                                SelectedIndex="0" CssClass="tabSubStrip" Width="698px">
                                <Tabs>
                                    <telerik:RadTab Value="Mask">
                                    </telerik:RadTab>
                                    <telerik:RadTab Value="Rules" Enabled="false">
                                    </telerik:RadTab>
                                </Tabs>
                            </telerik:RadTabStrip>--%>
                </div>
                <div class="clear">
                </div>
                </div>
                <div class="clear">
                </div>
                
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </div>
    <div class="Clear">
    </div>
    <div class="footerSave" runat="server">
        <asp:Table ID="Table2" runat="server" Width="100%" HorizontalAlign="Right">
            <asp:TableRow>
                <asp:TableCell HorizontalAlign="center">
                    <telerik:RadButton ID="btnSave" runat="server" Skin="Vista" Width="100px" OnClick="btnSave_OnClick" />
                    <telerik:RadButton ID="btnCancel" runat="server" Skin="Vista" Width="100px" CausesValidation="False"
                        ToolTip="Cancel" OnClientClicked="CancelEdit" />
                    <telerik:RadButton ID="btnDelete" runat="server" Skin="Vista" Width="100px" CausesValidation="False"
                        ToolTip="Remove current User" OnClick="btnDelete_OnClick" />
                </asp:TableCell></asp:TableRow>
        </asp:Table>
    </div>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
            <telerik:RadWindow ID="FieldFormDialog" runat="server" Height="600px" Width="900px"
                Skin="Vista" Left="15%" ReloadOnShow="true" ShowContentDuringLoad="false" Modal="true"
                VisibleStatusbar="false" Behaviors="Close" />
        </Windows>
    </telerik:RadWindowManager>
    </form>
</body>
</html>



regards
Dimitar Terziev
Telerik team
 answered on 17 May 2012
3 answers
188 views
I want to know, if exist some way, that i can do a radchart works with a tooltip, and scrolling, because if i enable scroll, tooltips doesnt work anymore.
<telerik:RadChart ID="RadChart1" runat="server" AutoLayout="True" OnItemDataBound="RadChart1_ItemDataBound"
          Skin="Windows7" Width="1200px">
          <ChartTitle TextBlock-Text="Gráficos">
          </ChartTitle>
          <Series>
              <telerik:ChartSeries DataYColumn="Vr_Lcto" Name="Series 1" Type="Line">
                  <Appearance>
                      <TextAppearance TextProperties-Font="Arial, 8.25pt" />
                      <PointMark Visible="True" Border-Width="2" Border-Color="White" Dimensions-AutoSize="false"
                          Dimensions-Height="12px" Dimensions-Width="12px">
                          <FillStyle MainColor="186, 207, 141" FillType="solid">
                          </FillStyle>
                      </PointMark>
                      <LineSeriesAppearance Width="5" />
                  </Appearance>
              </telerik:ChartSeries>
          </Series>
          <PlotArea>
              <XAxis DataLabelsColumn="Cd_Tp_Cnt">
                  <Appearance>
                      <TextAppearance TextProperties-Font="Arial, 8.25pt, style=Bold" />
                      <LabelAppearance RotationAngle="30">
                      </LabelAppearance>
                  </Appearance>
              </XAxis>
              <YAxis AxisMode="Extended">
                  <Appearance>
                      <TextAppearance TextProperties-Font="Arial, 8.25pt, style=Bold" />
                  </Appearance>
              </YAxis>
          </PlotArea>
          <Legend Visible="false"></Legend>
      </telerik:RadChart>
      <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Skin="Windows7"
          Width="200px" Animation="Slide" Position="TopCenter" EnableShadow="true" ToolTipZoneID="RadChart1"
          AutoTooltipify="true">
      </telerik:RadToolTipManager>


Thankz in advance!
Giuseppe
Telerik team
 answered on 17 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?