about contenttemplate of radwindow

6 posts, 0 answers
  1. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 15 Dec 2009 Link to this post

    hi

    i want to know if i can add my htmlHiddenInput value as the radwindow content?

    for example

    i have this control

    <input type="hidden" id="lblHelpPagina" runat="server" value="test"/> 


    this value i want is to show in radwindow
    when i click a button which fire the radopen event.

    this control is find in the main page..

    thanks a lot

    i need asnwer asap..

    regards
    webster
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Dec 2009 Link to this post

    Hello,

    I have attached 'OnClientShow' event to RadWindow in order to set the content according to the HiddenField value. Here is my code. give a try with this and see whether it suits your need.

    aspx:
     
    <input type="hidden" id="lblHelpPagina" runat="server" value="test" /> 
    <telerik:RadWindow ID="radWindow2" runat="server" VisibleOnPageLoad="true" Behavior="Move,Close,Reload" 
        OnClientShow="OnClientShow"
        <ContentTemplate> 
            <input id="Text1" type="text" onload="loadContent1();" /> 
        </ContentTemplate> 
    </telerik:RadWindow> 

    javascript:
     
        <script type="text/javascript"
            function OnClientShow() { 
                alert("Hi"); 
                var value = document.getElementById("lblHelpPagina"); 
                var content = document.getElementById("Text1"); 
                content.value = value.value; 
            } 
        </script> 

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 15 Dec 2009 Link to this post

    hi but how cn i open this radwindow?

    i want to open this window on button click
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Dec 2009 Link to this post

    Hi,

    Set the OpenerElementID property to the ControlID of button that you want the window to appear when the user clicks it.

    ASPX:
        <telerik:RadWindow ID="radWindow2" OpenerElementID="Button1" runat="server" Behavior="Move,Close,Reload"
            OnClientShow="OnClientShow">
            . . .
        </telerik:RadWindow>
        <asp:Button ID="Button1" runat="server" Text="Open Window" />




    Thanks,
    Princy.
  6. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 15 Dec 2009 Link to this post

    thanks for the help.. it works perfectly
  7. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 15 Dec 2009 Link to this post

    i have another question..

    what is the property to make my radwindow scroll able when its in overflow?
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017