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

Radwindow close button

13 Answers 1034 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kavita
Top achievements
Rank 1
Kavita asked on 07 Feb 2013, 10:05 AM
hello..
Is there any way to disable the close button on top right corner of radwindow?

13 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Feb 2013, 03:23 PM
Hello Kavita,

You can list the behaviors you want enabled in its Behaviors property:
http://www.telerik.com/help/aspnet-ajax/window-behavior-user-interaction-with-window.html
http://demos.telerik.com/aspnet-ajax/window/examples/behaviors/defaultcs.aspx
You may also find interesting this idea:
http://feedback.telerik.com/Project/108/Feedback/Details/37747-add-disabledbehaviors-property-for-radwindow

Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kavita
Top achievements
Rank 1
answered on 08 Feb 2013, 06:05 AM
hello
 I just want to display close button in disable state.
i dont want it to work.how can i do this?
0
Marin Bratanov
Telerik team
answered on 11 Feb 2013, 01:51 PM
Hi Kavita,

I can suggest several options:
1) cancel the OnClientBeforeShow event according to the value of a certain flag that you can raise in the RadWindow object with custom code once you get a reference to it. If the flag is raised then your code is closing the popup and the event should not be cancelled. If the flag is not raised the [x] button has been clicked and you need to cancel the event. After that you should reset the flag to null
2) add a custom button with the desired image, but this button will not have a handler at all. The Close behavior will also be disabled. See this KB article on adding a custom button.
3) disable the button with JavaScript in the OnClientShow event, e.g. $telerik.$(".rwCloseButton", sender.get_popupElement()).attr('disabled', 'disabled'); where sender is a reference to the RadWindow (the first argument the event handler receives).


Greetings,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kavita
Top achievements
Rank 1
answered on 12 Feb 2013, 06:00 AM
Thanks a lot Marin. Third option worked for me. :)
0
Kavita
Top achievements
Rank 1
answered on 18 Feb 2013, 06:04 AM
hello Marin,

I am having one problem with the third option you mentioned.
When radwindow opens up,the cross button appears disabled but on mouse hover its color is changing to red and tool tip is showing as "close".I don't want this to happen.Can you suggest me some solution for me. 
0
Marin Bratanov
Telerik team
answered on 19 Feb 2013, 11:37 AM
Hello Kavita,

I have offered several options that would not require overriding internal functionality of the RadWIndow. What I can suggest if you want to is that you simply examine the control through your developer toolbar and override the hover pseudoselector with the default one:
a.rwCloseButton:hover
{
      background-position: -90px 0 !important;
}


All the best,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Kavita
Top achievements
Rank 1
answered on 20 Feb 2013, 06:01 AM
Thanks a lot Marin..
It worked for me.
0
Qurat
Top achievements
Rank 1
answered on 12 Mar 2013, 07:46 AM
i am trying to use client template for my radhtmlchart but i am unable to do it because i am using a dataset from the DB.
i tried using this 
  //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
it is also not working.
please help me i have to submit the project and i have very less time

here is a piece of code :
 DataSet ds = DbHelper.ReadTable(sql1);
    
        if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows != null && ds.Tables[0].Rows.Count > 0)
        {
            //string[] arr = new string[15];
           
            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                SeriesItem si = new SeriesItem();
                si.YValue = (decimal)ds.Tables[0].Rows[i]["VoteShare"];
                si.Name = (string)ds.Tables[0].Rows[i]["PartyName"];
                 
                si.BackgroundColor = System.Drawing.ColorTranslator.FromHtml((string)ds.Tables[0].Rows[i]["PartyColor"]);
                PieChart1.PlotArea.Series[0].Items.Add(si);
                //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = (string)ds.Tables[0].Rows[i]["PartyName"];
                //arr[i]=si.Name.ToString();
                
            }

            //PieChart1.PlotArea.Series[0].TooltipsAppearance.ClientTemplate = ds.Tables[0].ToString();
            
        

attaching my project files

regards
@nnu shah
punjab lok sujag
0
Padma
Top achievements
Rank 1
answered on 18 Jun 2013, 02:19 PM
Hi, 
 I am padma.

I have very strange problem with rad window close.

In my application i am using rad window.
I am not able to see rad window close button completely.
the right edge is cutting off.

Coudl you please help me in this.

Below is my code

 <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ShowContentDuringLoad="false"
                                RestrictionZoneID="offsetElement" ReloadOnShow="true" EnableShadow="true" ShowOnTopWhenMaximized="false">
                                <Windows>
                                <telerik:RadWindow ID="RadWindow1"
                                        runat="server" Behaviors="Close"  VisibleTitlebar="true" 
                                         VisibleOnPageLoad="False" 
                                      Modal="true" VisibleStatusbar="false"  >
                                      
                               </telerik:RadWindow>
                                </Windows>
                            </telerik:RadWindowManager>
0
Marin Bratanov
Telerik team
answered on 19 Jun 2013, 02:11 PM
Hi Padma,

The entire screenshot looks a bit squeezed from the sides and this leads me to believe there is some custom CSS rule (or rules) that are affecting the page and thus causing the problem. More details on similar problems and troubleshooting steps are available here: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-distorted-appearance.html.


Regards,
Marin Bratanov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Padma
Top achievements
Rank 1
answered on 20 Jun 2013, 07:39 AM
Hi,

Thanks for the help.
I found that my custom CSS file is creating all the problem.

Now i am able to get perfect radwindow.


Thanks,
Padma
0
G
Top achievements
Rank 1
answered on 31 Jul 2013, 02:06 PM
Hi,

How I will change the close button same as windows close button ( Standard Microsoft Windows Close Icon (Red box w/ white X)).

Thanks,

GS
0
Shinu
Top achievements
Rank 2
answered on 02 Aug 2013, 03:39 AM
Hi G,

Try overriding the default CSS as follows.

CSS:
<style type="text/css">
    a.rwCloseButton
    {
        background: url("../Images/WinClose.png") no-repeat !important;
        background-position: center !important;
    }
</style>

Thanks,
Shinu.
Tags
General Discussions
Asked by
Kavita
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Kavita
Top achievements
Rank 1
Qurat
Top achievements
Rank 1
Padma
Top achievements
Rank 1
G
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or