Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
18 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
21 views

So i have the following ItemTemplate defined for a RadGrid


<telerik:GridTemplateColumn DataField="Description" HeaderText="Description">
	<ItemTemplate>
		<iframe>
			<telerik:RadEditor ID="ContentEditor1" onClientLoad="OnClientLoad" CssClass="Modal-Scroll2" Enabled="false" ToolsFile="~/ToolsFileEmpty.xml" runat="server" EditModes="Preview" NewLineMode="br" ContentFilters="DefaultFilters" Width="100%" >
				<CssFiles>
					<telerik:EditorCssFile Value="~/css/EditorStyles.css" />
				</CssFiles>
			</telerik:RadEditor>
		</iframe>
	</ItemTemplate>
</telerik:GridTemplateColumn>

However, when this renders on the page, the editor content appears in the wrong place:

and the end result is a bunch of empty iframes:

Ideas?

-Mark

 

 

Rumen
Telerik team
 answered on 20 Aug 2024
1 answer
13 views

I have blocks of HTML that are entered (usually copy and pasted in from email messages) by users of our system.  We don't know what this content will contain, or if the content (html) is even completed (maybe the copied part of a HTML message).  For that reason we display the content in a radeditor.  This content is read-only, so we set the Enabled property of the RadEditor to "false".   However when we do that, the content is no longer displayed in an iframe, despite using ContentAreaMode="Iframe".  

 

When the editor is Enabled, it renders like this instead:

 

The reason that we are trying to have the content rendered in an IFRAME is because this content sometimes includes CSS/Styles that modify the content in the parent container. 

For instance today we discovered this HTML embedded into a <style> tag.

div {
       display: block !important;
       visibility: visible !important;
       opacity: 1 !important
    }

And this caused all kinds of rendering problems on the page because it forced a ton of modal popup <div>'s to become visible that should be hidden.

 

Thanks for your help!

-Mark

Rumen
Telerik team
 answered on 19 Aug 2024
0 answers
21 views

Hi,

I cannot see the latest two downloaded version in my Update Wizard screen.

They are in the Update folder though, see screenshots.

VS 2022 Community with latest Telerik VS Extension.

Any suggestions?

 

Marc

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 14 Aug 2024
1 answer
24 views

Hi, 

Since the Microsoft.WindowsAzure.Storage is already deprecated, the RadCloudUpload is broken. Is there a solution for this or alternatives that you can suggest? Thank you

Attila Antal
Telerik team
 answered on 13 Aug 2024
2 answers
21 views

Hi !

I've got strange behavior with RadAjaxManager.
no problem without radAjaxManager

Normally I have a panel and editing in that panel should update its contents. but strange behaviors appear.

To test, I just added 2 edit boxes only for updating.

Example project and example video to explain.

1) Set "cumul" => calculate and update the content deductionRG (AjaxSetting)
2) Set "Pénalités" => Calculate and update Total Deductions content (AjaxSetting)

But Event is launched on Montant RG???
Radnumeric is disabled and I don't want the event to be fired if there was no user input.

3) Set "Autre" => Event launched but content received: 0
4) Define "Autre" again (other value: 80) => Value of the content received by the event: 80

This is a simple example, because this edition panel modifies for the user according to conditional parameters on the screen during the instance of the calculation class.
Vincent
Top achievements
Rank 1
Iron
Iron
 updated answer on 13 Aug 2024
0 answers
11 views
I have a RadTreeList and my data consists of 3 levels/hierarchy. I want to export it to excel with the grouping functionality. Unfortunately, Radtreelist doesn't have this functionality. Has anyone done something similar with RadSpreadProcessing?

I've read the documentation https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/grouping but haven't had any luck in implementing it.
Melville
Top achievements
Rank 1
 asked on 12 Aug 2024
1 answer
35 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
26 views
How can i download the Telerik Asp.Net ajax 2016 version?
Rumen
Telerik team
 answered on 30 Jul 2024
1 answer
27 views

I recently discovered your "Mentions" feature in WinForms and am looking to produce a WebForms version of this.  I did get close to creating this functionality; very close, actually.  Building it within the RadEditor has proven to be problematic, as the HTML created by the Editor tended to wreak havoc on my code.  It was pretty granular, in that I used character counts to track and locate "tagged"/"mentioned" users.  

Is there a WebForms version of this coming soon?  If not, can you offer some guidance on how to overcome some issues the Editor creates?

 

Rumen
Telerik team
 answered on 30 Jul 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
pleaseDeleteMyAccount
Top achievements
Rank 2
Herman Muliady
Top achievements
Rank 1
Kevin
Top achievements
Rank 2
Iron
Iron
Andres
Top achievements
Rank 1
Iron
Bradley
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
pleaseDeleteMyAccount
Top achievements
Rank 2
Herman Muliady
Top achievements
Rank 1
Kevin
Top achievements
Rank 2
Iron
Iron
Andres
Top achievements
Rank 1
Iron
Bradley
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?