This is a migrated thread and some comments may be shown as answers.

How to change the label text in custom radwindowmanager?

3 Answers 222 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nahid
Top achievements
Rank 1
Nahid asked on 14 Jul 2011, 02:32 PM

Hello ,
I am using custom radconfirm template. This is working fine. this is code. but I cann't change the text of lebel   "nodename".

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
 
        <ConfirmTemplate>
 
            <div class="confrmholder">
 
                <div style="width: 100%" align="center">
 
                    <asp:Label ID="Label1" CssClass="warningtext" runat="server" Text="Warning!"></asp:Label>
 
                </div>
 
                <div class="imgdiv">
 
                    <img src="worning.png" />
 
                </div>
 
                <div align="center">
 
                    <div align="center" style="width: 260px; float: left;">
 
                        <p>
 
                            Are you sure you want to delete the folder?
 
                        </p>
 
                        <p>
 
                        <asp:Label ID="nodename" CssClass="node" runat="server" Text="Node Name"></asp:Label>
 
                        </p>
 
                        <p>
 
                            This will delete all files.
 
                        </p>
 
                    </div>
 
                    <div align="center" style="padding-bottom: 8px; width:100%; float:left;">
 
                        <div>
 
                        <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
 
                            <span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span></span></a>
 
                        <a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);">
 
                            <span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[Cancel]##</span></span></a>
 
                        </div>
 
                    </div>
 
                </div>
 
            </div>
 
        </ConfirmTemplate>
 
    </telerik:RadWindowManager>

 

Now how can I change the name of tree node in the asp lable “nodename” dynamically?

Thanks
Nahid

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Jul 2011, 10:24 AM
Hello Nahid,

You can achieve this by showing the label in a ContentTemplate and access the controls as shown in the following help documentation.
Using RadWindow as controls container.

Thanks,
Princy.
0
Nahid
Top achievements
Rank 1
answered on 15 Jul 2011, 11:51 AM
Hello Princy,
Thanks for reply. I need it in client side, not server side. can you help me ?

Thanks
Nahid
0
Marin Bratanov
Telerik team
answered on 19 Jul 2011, 09:39 AM
Hello Nahid,

How you are going to access the controls you put in a container is a general task that is not directly related to our controls. Nevertheless what I would suggest in your case is that you put a simple span instead of a label so that its ID does not get changed an you can access it easily via JavaScript:

<p>
   <span id="nodename" class="node">Node Name</span>
 </p>

...
<asp:Button ID="Button1" Text="call radconfirm" runat="server" OnClientClick="confirmMe(); return false;" />
and the JavaScript:
function confirmMe()
{
    var oConfirm = radconfirm("sure?");
    $get("nodename").innerHTML = theValue;
}



Greetings,
Marin
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Window
Asked by
Nahid
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Nahid
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or