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

I checked the demo at https://demos.telerik.com/aspnet-ajax/window/examples/rendermodes/defaultcs.aspx?skin=MetroTouch with render mode set to classic in Chrome's Dev Tools > Mobile device emulator. I noticed a vertical line between the td cells in the title bar row as shown in screenshot below. I also noticed a similar issue with Metro skin in classic render mode. If I view the same in non-mobile mode in Chrome then this issue disappears. Perhaps, its some styling issue, but I could not find any CSS causing this.

It makes the title bar look non-uniform and not good in appearance.

What is causing the break among the td cells in the title bar for this case? (i.e. vertical line can be seen where the first td cell in title bar ends and then where the third td cell begins)

However, I did find a workaround solution using the  jquery code below. 

$(".RadWindow:visible").each((index, emt) => {
    $(this).find("tr.rwTitleRow td.rwTopLeft, .RadWindow tr.rwTitleRow td.rwTopRight").css("display", "none");
    $(this).find("tr.rwTitleRow td.rwTitlebar").attr("colspan", "3");
});

Vasko
Telerik team
 answered on 17 Mar 2025
1 answer
108 views

Hi.

When we open a new radwindow using radopen client-side it doesn't work setting the ShowContentDuringLoad property.

Example code:

var wnd = radopen(sURL, null);
wnd.set_showContentDuringLoad(false);

 

I assume this should work ok?

Regards, Rolf

Vasko
Telerik team
 answered on 28 Aug 2024
1 answer
50 views
Having issues trying to get multiple textboxes to populate a single rad window depending on which submit button is clicked. I am trying to eventually output from rad window as it will post with what ever information I pull output onto window and then the start button will then timestamp. I am mainly just doing this piece by pice and want to just output something. This is the code that I have so far.
Imports Telerik.Web.UI

Partial Class TestPage
    Inherits System.Web.UI.Page


    Protected Sub Start_RadButton1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Start_RadButton1.Click
        ShowRadWindowWithContent(RadTextBox7.Text)
    End Sub

    Protected Sub Start_RadButton2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Start_RadButton2.Click
        ShowRadWindowWithContent(RadTextBox8.Text)
    End Sub

    Private Sub ShowRadWindowWithContent(ByVal content As String)
        ' Encode content to be safely used in JavaScript
        Dim encodedContent As String = HttpUtility.JavaScriptStringEncode(content)

        ' Register JavaScript to update and show the RadWindow
        Dim script As String = "function openRadWindow() { " _
        & "    var radWindow = $find('" & RadWindow2.ClientID & "'); " _
        & "    if (radWindow) { " _
        & "        var contentLabel = radWindow.get_contentElement().querySelector('#DynamicLabel'); " _
        & "        if (contentLabel) { " _
        & "            contentLabel.innerHTML = '" & encodedContent & "'; " _
        & "        } " _
        & "        radWindow.show(); " _
        & "    } " _
        & "} openRadWindow();"

        RadScriptManager.RegisterStartupScript(Me, Me.GetType(), "ShowRadWindow", script, True)
    End Sub
End Class

<%@ Page Language="vb" AutoEventWireup="false" CodeFile="TestPage.aspx.vb" Inherits="TestPage" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Dynamic RadWindow Example</title>
</head>
<body>
    <form id="form1" runat="server">
        
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadWindow ID="RadWindow2" runat="server" Modal="True" Skin="Metro" Visible="false">
            <ContentTemplate>
                <div class="content-container">
                    <div class="rad-label">
                        <telerik:RadLabel Text="Start Task?" runat="server" style="color: azure" />
                    </div>
                    <div id="contentContainer">
                        <telerik:RadLabel ID="DynamicLabel" runat="server" />
                    </div>
                    <div class="button-container">
                        <asp:Button ID="Button1" runat="server" Text="Start" />
                        <asp:Button ID="Button2" runat="server" Text="Cancel" />
                    </div>
                </div>
            </ContentTemplate>
        </telerik:RadWindow>

        <telerik:LayoutRow>
            <Columns>
                <telerik:LayoutColumn Span="3" SpanXs="0" SpanSm="0">
                    <div class="col">
                        <label>Test: </label>
                    </div>
                </telerik:LayoutColumn>
                <telerik:LayoutColumn Span="8" SpanXs="12" SpanSm="12">
                    <telerik:RadTextBox ID="RadTextBox7" RunAt="server"/>
                    <telerik:RadButton ID="Start_RadButton1" runat="server" Text="Start" OnClick="Start_RadButton1_Click" />
                </telerik:LayoutColumn>
            </Columns>
        </telerik:LayoutRow>

        <telerik:LayoutRow>
            <Columns>
                <telerik:LayoutColumn Span="3" SpanXs="0" SpanSm="0">
                    <div class="col">
                        <label>TimeStamp: </label>
                    </div>
                </telerik:LayoutColumn>
                <telerik:LayoutColumn Span="8" SpanXs="12" SpanSm="12">
                    <telerik:RadTextBox ID="RadTextBox8" RunAt="server"/>
                    <telerik:RadButton ID="Start_RadButton2" runat="server" Text="Start" OnClick="Start_RadButton2_Click" />
                    <telerik:RadButton ID="RadButton22" runat="server" Text="Completed"/>
                </telerik:LayoutColumn>
            </Columns>
        </telerik:LayoutRow>
    </form>
</body>
</html>


Rumen
Telerik team
 answered on 21 Aug 2024
1 answer
102 views

I am trying to open a new window when a user clicks a button but need to pass 'CallLogID' into my query parameters. For the life of me I can not seem to get the CallLogID to show up. The value of CallLogID is in a datafield set to Display="False". I have tried using <%# Eval() %> but maybe I am not using the appropriate escape characters. Any help would be much appreciated.

Here are my code snippets that are currently working to open a new tab and navigate to the specified URL.

            <telerik:GridTemplateColumn HeaderText="Follow Up" UniqueName="FollowUp">
                <HeaderStyle Width="22%" /> 
                <ItemStyle Width="22%" /> 
                <ItemTemplate>
                    <asp:LinkButton ID="lnkFollowUp" runat="server" OnClick="FollowUpView" ToolTip="Follow Up">
                        (<%# Eval("FollowUpCount") %>) view
                    </asp:LinkButton>
                    <asp:Literal ID="separator" runat="server" Text=" | " />
                    <asp:LinkButton ID="FollowUpAdd" runat="server" Text="add" ToolTip="Follow Up" OnClientClick="window.open('addfollowuptocalllog.aspx?calllogid=', '_blank'); return false;"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn>

            <telerik:GridBoundColumn DataField="CallLogID" UniqueName="CallLogID" Visible="True" Display="False">
                <ColumnValidationSettings>
                    <ModelErrorMessage Text=""></ModelErrorMessage>
                </ColumnValidationSettings>
            </telerik:GridBoundColumn>

Vasko
Telerik team
 answered on 05 Aug 2024
1 answer
89 views
I was curious if anyone could point me in the right direction on how to show a webpage within telerik controls. I am not sure where to start on this and cant seem to find any relevant information.
Rumen
Telerik team
 answered on 23 Jul 2024
1 answer
154 views

I mm facing an issue on my ASP.NET page where I'm using RegisterStartupScript to call a JavaScript function from the code-behind.

The JavaScript function is intended to close a Telerik RadWindow using

var oWnd = GetRadWindow();

oWnd.close();.

 

However, upon execution,

I receive the following error:

'Error code: STATUS_ACCESS_VIOLATION'. Could you please assist me in resolving this issue?

 

Rumen
Telerik team
 answered on 07 May 2024
1 answer
794 views

The pop up that I am trying to display when clicking on an <a> tag seems to not be able to take in the URL that I have passed into it via a post-back. All this does is to throw me an error stating. These snippet of  code seems to be working on a previous iteration of an application but seems to be continuing to throw this error in this new iteration of the application that I am currently developing.

Uncaught TypeError: Cannot read properties of undefined (reading 'open')
    at window.radopen 
    at OpenForm 
    at HTMLAnchorElement.onclick
window.radopen
OpenForm
onclick

 

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Animation="Resize"
    OnClientBeforeShow="clientBeforeShow" AutoSize="true" Title="Product Details"
    ViewStateMode="Disabled" EnableViewState="false" Behaviors="Close, Move" VisibleOnPageLoad="false"
    VisibleStatusbar="false" DestroyOnClose="true" MinWidth="650px" MinHeight="500px">
    <Windows>
        <telerik:RadWindow ID="ConfirmDialogue" runat="server" Title="Product Details"
            AutoSize="true" DestroyOnClose="true" EnableViewState="false" ReloadOnShow="true"
            Style="display: none;" ShowContentDuringLoad="false" Modal="true" VisibleStatusbar="false">
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

 

My javascript:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">

        function OpenForm(arg) {
            console.log("Argument: ", arg);
            var encodedArg = encodeURIComponent(arg);
            window.radopen(encodedArg, "ConfirmDialogue");
        }

        $(function () {
            $("#tabs-min").tabs();
        });

        function onClientClickPostbackBill() {
            __doPostBack('<%=lnkBill.UniqueID%>', '');
        }

        function onClientClickPostbackStuff() {
            __doPostBack('<%=lnkStuff.UniqueID%>', '');
        }

        function onClientClickPostbackProduct() {
            __doPostBack('<%=lnkProduct.UniqueID%>', '');
        }

        function onClientClickPostbackMerch() {
            __doPostBack('<%=lnkMerch.UniqueID%>', '');
        }

        function onClientClickPostbackUsers() {
            __doPostBack('<%=lnkUsers.UniqueID%>', '');
        }


        function onClientClickPostbackALL() {
            __doPostBack('<%=lnkALL.UniqueID%>', '');
        }

        function onClientClickPostbackREVIEW() {
            __doPostBack('<%=lnkREVIEW.UniqueID%>', '');
        }



        function printPage(productNo) {
            var div = document.getElementById("printerDiv");
            div.innerHTML = '<iframe id="printframe" src="Letter.aspx?BatchNo=' + batchNo + '"  height="0px" width="0px"  onload="printIframe();"></iframe>';
        }

        function print2LAPage(productNo, searchType) {
            var div = document.getElementById("printerDiv");
            div.innerHTML = '<iframe id="printframe" src="/ProductManagement/PrintProductList.aspx?ProductNo=' + productNo + '&ProductType=' + searchType + '"  height="0px" width="0px"  onload="printIframe();"></iframe>';
        }
        function printReview(batchNo, searchType) {
            var div = document.getElementById("printerDiv");
            div.innerHTML = '<iframe id="printframe" src="/ProductManagement/PrintProductList.aspx?ProductNo=' + productNo + '&ProductType=' + searchType + '"  height="0px" width="0px"  onload="printIframe();"></iframe>';
        }

        function printIframe() {
            var x = document.getElementById("printframe");
            var y = (x.contentWindow || x.contentDocument);
            y.focus();
            // x.contentWindow.document.execCommand('print', false, null);
            var oframe = document.getElementById("printframe");
            var odoc = oframe.contentWindow.document;
            var strlenght = odoc.documentElement.getElementsByTagName('body')[0].innerText;

            if (strlenght.trim() == '') {
                var message = "Quantity for this product cannot be found";
                alert(message);
            }
            else {
                x.contentWindow.document.execCommand('print', false, null);
            }
            // y.print();
        }

    </script>
</telerik:RadCodeBlock>

 

 

Rumen
Telerik team
 answered on 28 Mar 2024
1 answer
95 views

RadWindow is showing a tooltip with its ID in it. See attached image. How can I disable this?


Vasko
Telerik team
 answered on 12 Jan 2024
0 answers
120 views
The minimum code. Why radwindow can show, let's say "bing.com", "www.wikipedia.org", but refused to show "google.com" and even "telerik.com". Even telerik demo gives "www.google.com refused to connect", or "www.telerik.com refused to connect"
Vadim
Top achievements
Rank 1
 asked on 05 Jan 2024
3 answers
80 views

Hi,

I would like to change the height and width of the button in the alert windows.

See the attached image, the button is too small.

Regards,

Omar

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 27 Nov 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?