Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
119 views

I can find how to create snippets here:

 

https://docs.telerik.com/devtools/aspnet-ajax/controls/editor/functionality/toolbars/dropdowns/code-snippets

But what is the correct toolname to add the snippets dropdown in the toolbar?

Cannot find it in the docs...

 

Marc

Vessy
Telerik team
 answered on 11 Mar 2021
7 answers
208 views
I have the following in my tools file XML, when I remove a class, it is removed from the editor.  However, when I add a class entry and associated .class definition in the style sheet, I do not get the class in the styles drop-down in the editor.

<classes>
    <class name="Photo (Left)" value=".photo-left"></class>
    <class name="Photo (Right)" value=".photo-right"></class>
 </classes>


Rumen
Telerik team
 answered on 10 Mar 2021
1 answer
684 views

 

We are trying to upload file using telerik RadAsynchUpload controller. File upload controller works fine in Internet Explorer, Edge Chromium and Firefox browser but it doesn't works in chrome browser. We can select file but during upload it freeze.
Following version of Telerik.Web.UI.RadAsyncUpload
Runtime version : v2.0.50727
Version: 2013.2.709.35

We updated Telerik.Web.UI.RadAsyncUpload to following version but still not working in chrome browser.

Runtime Version: v4.0.30319
Version: 2020.1.114.45

Please advise which version to use or any other solution.


Thanks,
Muhammad

Vessy
Telerik team
 answered on 10 Mar 2021
3 answers
122 views

Hoping someone can help. I've been in a shared hosting environment for about 3 years with smarterasp. Their service is so bad and unreliable that I finally had to change. I picked interserver.net and have the same shared service. My code has worked perfectly for 3 years so I know it works. Now, with the new provider, it does not work. They are willing to install anything I need, but I don't know what is needed. 

So far, they have installed MDAC 2.6 and Asp.net AJAX. 32bit support has been enabled and CAS full-trust is also enabled. But it still isn't working. I've attached the latest error I'm getting. I have found a few articles about referencing certain things in system.webserver, however i haven't had to do this for the last 3 years, so not sure why now. 

If anyone can help me get this resolved, I'll even pay them. Just need to get it done asap or else i need to leave interserver for someone else. My site is very busy and i don't have much down time to test.

If you know of anything I need to tell my hosting provider to turn on or certain things that need to be installed, please let me know. They are standing by.

Rumen
Telerik team
 answered on 10 Mar 2021
1 answer
143 views

i am using Radgrid edit form type=popup in my web application using asp.net c#. i want to bind dropdown list selected value on edit but whenever i bind it in web user control form then add new record and edit button command of my radgrid is not fired. here is my dropdownlist code :-

 <asp:DropDownList ID="ddlTranType" runat="server" Width="200" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.TRAN_TYPE") %>'>
                                    <asp:ListItem Text="Sales" Value="ORD"></asp:ListItem>
                                    <asp:ListItem Text="Purchase" Value="PUR"></asp:ListItem>

</asp:DropDownList >

Doncho
Telerik team
 answered on 10 Mar 2021
3 answers
697 views

Hi,

I have a table with a header and 2 columns. In the left column I'm loading a pdftreeview with a lot of entries. This is scrolling neatly inside its column.

In the right column I'm loading the pdfviewer to show pdf files that are clicked in the tree view.

I don't want any scroll bars in the pdfviewer column. I want it to size automatically to its available space in that column.

I have already set the FitToWindow in client side script. But the container where the pdf is loaded in causes the windows to scroll.

Can the height be adjusted so it takes up the available space, without scroll bars?

Doncho
Telerik team
 answered on 10 Mar 2021
5 answers
172 views
I do not want Description box to go away without appearing all the time. How do I do that.
Now I must go with the mouse pointer for it to resurface, or I can put time how long it stays?
Vessy
Telerik team
 answered on 09 Mar 2021
21 answers
1.6K+ views
Hi All,

I have a link to popup a RadWindow.
This is working fine.

On the popup window, I have 3 radio button (Excel, PDF, CSV) and 2 buttons (Save As, Close).
This is working fine.

When user click on 'Save As' button, system will show a 'Save As' window to user to choose the file name and file location.
System will then export the data to the format they choose.
This is working fine.

When user click on 'Close' button, system will close the popup window.
This is working fine too.

Now, the problem is the popup window didn't close after the data is exported.
I think this is due to the system still need to continue to do the export even I have the close at the end of the function.

Please help.

Parent code.
    <telerik:RadWindowManager ID="reportSettingsWindowManager" KeepInScreenBounds="true" 
        runat="server" VisibleStatusbar="false" DestroyOnClose="true" Modal="true" Behaviors="Close,Move">  
        <Windows> 
            <telerik:RadWindow ID="downloadWindow" DestroyOnClose="true" runat="server" Modal="true" 
                VisibleStatusbar="false" Behaviors="Close,Move" /> 
        </Windows> 
    </telerik:RadWindowManager> 
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">  
 
        <script language="javascript" type="text/javascript">  
            function fnCustomizeDownload(name) {  
                var radWindowMgr = $find("<%= reportSettingsWindowManager.ClientID %>")  
                var wnd = radWindowMgr.open('<asp:Literal ID="ltrlDownloadFormat" runat="server" />', name);  
                wnd.setSize(300, 225);  
                wnd.show();  
                return false;  
            }  
 
        </script> 
 
    </telerik:RadScriptBlock> 
 
    <div id="content">  
        <ul id="actions">  
            <li id="liDownloadData" runat="server"><href="#" onclick="fnCustomizeDownload('downloadWindow');return false;">  
                <asp:Literal ID="ltrlDownloadData" runat="server" Text="<%$ Resources:Link, ltrlDownloadData %>" /> 
            </a></li>  
        </ul> 
    </div> 
 

Child ASPX Code
    <telerik:RadScriptBlock ID="scriptBlock1" runat="server">  
 
        <script language="javascript" 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;  
            }  
 
    <table style="width: 220px">  
    <tr> 
        <td colspan="2" class="style1">  
        <asp:Panel ID="Panel2" runat="server"  GroupingText="<%$ Resources:ltrlDownloadGroupingText %>" 
                 Height="99px">  
        <asp:RadioButtonList ID="SelRadioButtonList1" runat="server" Height="55px"   
                Width="211px">                  
                <asp:ListItem Selected="True" Text="<%$ Resources:ltrlDownloadExcel %>"></asp:ListItem> 
                <asp:ListItem Text="<%$ Resources:ltrlDownloadPDF %>"></asp:ListItem> 
                <asp:ListItem Text="<%$ Resources:ltrlDownloadCSV %>"></asp:ListItem> 
        </asp:RadioButtonList> 
        </asp:Panel> 
        </td> 
    </tr> 
    <tr> 
        <td> 
            <asp:Button ID="btnSaveAs" runat="server" Text="<%$ Resources:Button, btnSaveAs %>" OnClick="btnSaveAs_Click" /> 
        </td> 
        <td> 
            <asp:Button ID="btnClose" runat="server" Text="<%$ Resources:Button, btnClose %>" OnClick="btnClose_Click" /> 
        </td> 
    </tr> 
    </table>    
 
            function Close()  
            {  
                var arg = new Object();  
                var oWnd = GetRadWindow();  
                oWnd.close(arg);  
            }  
 
        </script> 
 
    </telerik:RadScriptBlock> 
 

Child C# Code
        protected void btnSaveAs_Click(object sender, EventArgs e)  
        {  
            Logger.LogInformation("Start""btnSaveAs_Click""DownloadFormat");  
            DownloadData();  
            lblCloseWindow.Text = GetRadWindowCloseScript();  
            Logger.LogInformation("End""btnSaveAs_Click""DownloadFormat");  
        }  
 
        protected void btnClose_Click(object sender, EventArgs e)  
        {  
            Logger.LogInformation("Start""btnClose_Click""DownloadFormat");  
            lblCloseWindow.Text = GetRadWindowCloseScript();  
            Logger.LogInformation("End""btnClose_Click""DownloadFormat");  
        }  
 
        private void DownloadData()  
        {  
            Logger.LogInformation("Start""DownloadData""DownloadFormat");  
            //CSV  
            if (SelRadioButtonList1.SelectedItem.Text == SelRadioButtonList1.Items[2].Text)  
            {  
                this.SetCSVDelimiter();  
                this.radGrid.MasterTableView.ExportToCSV();  
            }  
            //Excel  
            else if (SelRadioButtonList1.SelectedItem.Text == SelRadioButtonList1.Items[0].Text)  
            {  
                this.radGrid.MasterTableView.ExportToExcel();  
            }  
            //PDF  
            else if (SelRadioButtonList1.SelectedItem.Text == SelRadioButtonList1.Items[1].Text)  
            {  
            }  
            Logger.LogInformation("End""DownloadData""DownloadFormat");  
        }  
 
        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>";  
        }  
 

Anatoly
Top achievements
Rank 1
Iron
 answered on 09 Mar 2021
7 answers
197 views
I generally use the standard commanditem. However, when I use the commanditemtemplate I'd like it to look like the standard skinned commanditem (buttons, links, etc.).

How do I best go about this?
Peter Milchev
Telerik team
 answered on 09 Mar 2021
1 answer
159 views

Hi,

 

In the code below I would like to know how can I apply the skin "Glow" but ONLY in the RadListView1 (and obviously everything within it).

I am not managing how to do that. Any idea?

 

This is my ASPX code:

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="iPMP.aspx.vb" Inherits="custom_scripts_iPMP_iPMP" %>

<!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>
    <title>Telerik ASP.NET Example</title>
    <link rel="stylesheet" href="ipmpstyle.css?26" class="Telerik_stylesheet" />
    <link rel="stylesheet" href="ListView.css" class="Telerik_stylesheet" />
    <link rel="stylesheet" href="ListViewExtra.css" class="Telerik_stylesheet" />

    <style type="text/css">
        .RadAutoCompleteBox_Default .racTokenList
        {
            border-radius: 5px;
            border-color: dimgrey;
        }
    </style>
    <style type="text/css">
        [style*="--aspect-ratio"] > :first-child {
        width: 100%;
        }
        [style*="--aspect-ratio"] > img {
        height: 100%;
        }
        @supports (--custom:property) {
        [style*="--aspect-ratio"] {
        position: relative;
        }
        [style*="--aspect-ratio"]::before {
        content: "";
        display: block;
        padding-bottom: calc(100% / (var(--aspect-ratio)));
        }
        [style*="--aspect-ratio"] > :first-child {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        }
        }
    </style>

</head>
 
<body>
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>

    <script type="text/javascript">

        function requesting(sender, eventArgs) {

            var acbox = $find('<%= RadAutoCompleteBox1.ClientID %>');
            var acboxcontents = acbox.get_inputElement();
            typed = acboxcontents.value;
        }

    </script>

    <form id="form1" runat="server" style="border-radius:15px; background:rgba(146,167,160,.5); border-style:solid; border-width:1px; border-color:white; padding:20px;height:120px;">
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />

        <telerik:RadAjaxManager ID="ajaxmanager1" runat="server" EnableAJAX="true">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAutoCompleteBox1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadAutoCompleteBox1" LoadingPanelID="radloadingpanel1" />
                        <telerik:AjaxUpdatedControl ControlID="divLoading" LoadingPanelID="radloadingpanel1" />
                        <telerik:AjaxUpdatedControl ControlID="lblNoOEMParts" LoadingPanelID="radloadingpanel1" />
                   </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel ID="radloadingpanel1" runat="server" AnimationDuration="0" InitialDelayTime="1000"></telerik:RadAjaxLoadingPanel>

        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" />
        <telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecoratedControls="All" DecorationZoneID="demo-container" EnableRoundedCorners="false" />
        <telerik:RadAjaxPanel ID="rap1" runat="server" EnableAJAX="true">
            <div style="font-family:'robotoregular';font-style:italic;color:#ffffff;margin-bottom:7px;">Type in year, model and part name (eg. 2010 Accord Alternator)</div>

            <telerik:RadAutoCompleteBox RenderMode="Lightweight" runat="server" ID="RadAutoCompleteBox1" ClientID="RadAutoCompleteBox1" 
                autopostback="true" 
                InputType="Token" Width="100%" Visible="true"
                AllowCustomEntry = "false"
                DropDownWidth="300px"
                onclientrequesting="requesting"
                Filter="StartsWith"
                >

                <WebServiceSettings Path="iPMP.asmx" Method="GetItems" />

            </telerik:RadAutoCompleteBox>

            <div ID="divLoading" style="width:20px;position:relative;visibility:hidden;display:none;text-align:right;margin-top:-32px;float:right;margin-right:15px;z-index:1000" runat="server" autopostbcak="true"><img alt="" src="loading.gif" /></div>

            <br />
            <asp:label id="lblNoOEMParts" ClientID="lblNoOEMParts" runat="server" visible="false" style="margin-top:-50px;position:absolute;">No OEM parts available found!</asp:label>

            <asp:Panel ID="pnlListView" runat="server" Visible="false" style="margin-top:-100px">
                <div class="demo-container size-wide" id="demo-container">
                    <table>
                        <tr>
                            <td>
                                <telerik:RadListView ID="RadListView1" runat="server" RenderMode="Lightweight"
                                    ItemPlaceholderID="CustomersContainer" AllowPaging="true" OnPageIndexChanged="RadListView1_PageIndexChanged">
                                    <LayoutTemplate>
                                        <legend>Alternate Parts</legend>
                                        <table>
                                            <tr>
                                                <td>
                                                    <telerik:RadDataPager RenderMode="Lightweight" ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                                                        PageSize="2" CssClass="pagerStyle">
                                                        <Fields>
                                                            <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                                                            <telerik:RadDataPagerButtonField FieldType="Numeric" PageButtonCount="4"></telerik:RadDataPagerButtonField>
                                                            <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                                                            <telerik:RadDataPagerPageSizeField PageSizeComboWidth="60" PageSizeText="Page size: "></telerik:RadDataPagerPageSizeField>
                                                            <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go"
                                                                ></telerik:RadDataPagerGoToPageField>
                                                        </Fields>
                                                    </telerik:RadDataPager>
                                                </td>
                                            </tr>
                                        </table>
                                        <fieldset id="FiledSet1" class="mainFieldset">
                                            <div class="RadListView RadListView_<%# Container.Skin %>">
                                                <asp:PlaceHolder ID="CustomersContainer" runat="server"></asp:PlaceHolder>
                                            </div>
                                            <div class="clearFix">
                                            </div>
                                        </fieldset>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <fieldset class="fieldset itemFieldset">
                                            <legend>Part: <%#Eval("Description")%></legend>
                                            <table class="dataTable">
                                                <tr class="rlvI">
                                                    <td>
                                                        <table class="itemTable">
                                                            <tr>
                                                                <td>
                                                                    <table class="innerItemTable">
                                                                        <tr>
                                                                            <td>
                                                                                Stock: <%#Eval("StockTicketNumber")%>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                Mileage: <%#Eval("Mileage")%>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                Cond.: <%#Eval("ConditionsAndOptions")%>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                Price: $<%# Eval("RetailPrice")%>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                                <td>
                                                                    <img src=<%#Eval("PartPic")%> style="height:90px;" />
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </td>
                                                </tr>
                                            </table>
                                        </fieldset>
                                    </ItemTemplate>
                                </telerik:RadListView>
                            </td>
                        </tr>
                    </table>   
                </div>
            </asp:Panel>
        </telerik:RadAjaxPanel>
   </form>
</body>
</html>

Any idea on how do that?

Thanks!

Peter Milchev
Telerik team
 answered on 08 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?