Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
229 views
Hi All,
DestroyOnClose seems to be one of those topics that reoccurs but never really gets resolved.
I am suffering from the continued caching problem regardless of the DestroyOnClose variable. The thing that has ended most other threads on this has been a Telerik support person being unable to replicate or asking for an example. So I have done one up. The simplest I can think of.  Since I cannot attach the project here, please see the code below.
Using this example :
  1. Start the solution using MainPage as the start page
  2. Click on the Launch1 button
  3. A modal popup window will appear, with the string "Launch1" on the second line - as expected.
  4. Close the window.
  5. Now click on the Launch2 button.
  6. The modal reappears, bearing the same content - is should say "Launch2" in the text.

I am using 2010.3.1109.40 version of the Telerik.Web.UI.

Please help me out with this.
Thanks,
Steele.

MainPage.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="TestTelerikWebApp.MainPage" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="buttLaunch1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="buttLaunch1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="buttLaunch2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="buttLaunch2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" 
        DestroyOnClose="True">
    </telerik:RadWindowManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function OpenMyWindow() {
            var oManager = null;
            if (typeof (GetRadWindowManager) == 'function') // there is a radwindowmanager in scope, so use it
                oManager = GetRadWindowManager();
  
            var oWnd = oManager.open('TestPopup.aspx', 'This is a test');
        }
    </script>
    </telerik:RadCodeBlock>
    <div>
      
        <asp:Button ID="buttLaunch1" runat="server" Text="Launch1" 
            onclick="buttLaunch1_Click" />
        <asp:Button ID="buttLaunch2" runat="server" Text="Launch2" 
            onclick="buttLaunch2_Click" />
      
    </div>
    </form>
</body>
</html>

MainPage.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
namespace TestTelerikWebApp
{
    public partial class MainPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
  
        protected void buttLaunch1_Click(object sender, EventArgs e)
        {
            Session["ErrorInfo"] = "Launch1";
            RadAjaxManager1.ResponseScripts.Add("OpenMyWindow();");
        }
  
        protected void buttLaunch2_Click(object sender, EventArgs e)
        {
            Session["ErrorInfo"] = "Launch2";
            RadAjaxManager1.ResponseScripts.Add("OpenMyWindow();");
        }
    }
}

TestPopup.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPopup.aspx.cs" Inherits="TestTelerikWebApp.TestPopup" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      
        I am a popup<br />
        <asp:Label ID="lblMessage" runat="server"></asp:Label>
      
    </div>
    </form>
</body>
</html>

TestPopup.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
namespace TestTelerikWebApp
{
    public partial class TestPopup : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMessage.Text = Session["ErrorInfo"].ToString();
        }
    }
}
Georgi Tunev
Telerik team
 answered on 06 Jan 2011
4 answers
208 views
Hi

I wanted to remove the Size column from the built in Media/Flash/Image Manager dialogs in the editor but on reading this posting it appears that the only solution is to hide it.

I have already customised the built in dialogs by extracting their .ascx files to a folder in my solution and from what I can see it appears that the FileBrowser.ascx is the file that i need to change.  The above posting suggests that I need to use the code below to hide the Size column.  What I cannot determine however is how to hook up this code.  There is no codebehind for fileBrowser.ascx and despite adding an inline Page_Load event to the fileBrowsers.ascx markup I cannot seem to tap into the page load event which would allow me to use the code below

GridColumn SizeColumn = RadFileExplorer1.Grid.Columns.FindByUniqueNameSafe("Size");
SizeColumn.ItemStyle.Width = Unit.Pixel(1);
SizeColumn.HeaderStyle.Width = Unit.Pixel(1);

Any suggestions on how I can achieve this ?

thanks in advance
Rumen
Telerik team
 answered on 06 Jan 2011
1 answer
227 views

Hello,

I have a problem with RadFormDecorator control.

Here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head id="Head1" runat="server">  
    <title>Test Page</title>  
    <link rel="stylesheet" type="text/css" href="Skins/FormDecorator/00ccff/FormDecorator.00ccff.css" />
    <link rel="stylesheet" type="text/css" href="Skins/FormDecorator/00ff00/FormDecorator.00ff00.css" />
</head>  
<body>  
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager>  
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator1" Skin="00ccff" EnableEmbeddedSkins="false" DecoratedControls="CheckBoxes" DecorationZoneID="00ccffZoneID1" />
    <telerik:RadFormDecorator runat="server" ID="RadFormDecorator2" Skin="00ff00" EnableEmbeddedSkins="false" DecoratedControls="CheckBoxes" DecorationZoneID="00ff00ZoneID1" />
                                
    <span id="00ccffZoneID1" >
        <asp:CheckBox ID="CheckBox1" runat="server" />
    </span>
  
    <span id="00ff00ZoneID1">
        <asp:CheckBox ID="CheckBox2" runat="server" />
    </span>
    </form>  
</body>  
</html>

By running the above code using Chrome or Safari then I get the result which is shown in the attached image 1.jpg, and by running the above code using other browsers, I get the result which is shown in 2.jpg.

Here is FormDecorator.00ccff.css:
/* RadFormDecorator for ASP.NET 00ccff Skin */
  
/* CSS class for styling the decoration zone or the <html /> tag of the page */
.RadForm_00ccff.rfdZone
{
    background-color: Green;
    color:#00ccff;
}
  
  
/* Decorate <input type="checkbox" /> */
.RadForm_00ccff .rfdCheckboxUnchecked,
.RadForm_00ccff .rfdInputDisabled.rfdCheckboxUnchecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 0;
}
  
.RadForm_00ccff .rfdCheckboxUnchecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 -200px;
}
  
.RadForm_00ccff .rfdCheckboxChecked,
.RadForm_00ccff .rfdInputDisabled.rfdCheckboxChecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 -420px;
}
  
.RadForm_00ccff .rfdCheckboxChecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 -640px;
}
  
  
/* the styling of radiobuttons and checkboxes in Safari and Chrome is already fully achieved with CSS */
@media screen and (-webkit-min-device-pixel-ratio: 0)
{
    /* checkboxes */
    .rfdCheckbox input[type="checkbox"],
    .rfdCheckbox input[type="checkbox"][disabled]:hover
    {
        background-image: url('CheckBox/CheckBoxSprites.gif');
    }
}
  
@media screen and (-webkit-min-device-pixel-ratio: 0)
{
    /* checkboxes */
    #cc00ffZoneID1 input[type="checkbox"],
    #cc00ffZoneID1 input[type="checkbox"][disabled]:hover
    {
        background-image: url('CheckBox/CheckBoxSprites.gif');
    }
}

And FormDecorator.00ff00.css:
/* RadFormDecorator for ASP.NET 00ff00 Skin */
  
/* CSS class for styling the decoration zone or the <html /> tag of the page */
.RadForm_00ff00.rfdZone
{
    background-color: Green;
    color:#00ff00;
}
  
  
/* Decorate <input type="checkbox" /> */
.RadForm_00ff00 .rfdCheckboxUnchecked,
.RadForm_00ff00 .rfdInputDisabled.rfdCheckboxUnchecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 0;
}
  
.RadForm_00ff00 .rfdCheckboxUnchecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 -200px;
}
  
.RadForm_00ff00 .rfdCheckboxChecked,
.RadForm_00ff00 .rfdInputDisabled.rfdCheckboxChecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 -420px;
}
  
.RadForm_00ff00 .rfdCheckboxChecked:hover
{
    background: transparent url('CheckBox/CheckBoxSprites.gif') no-repeat 0 -640px;
}
  
  
/* the styling of radiobuttons and checkboxes in Safari and Chrome is already fully achieved with CSS */
@media screen and (-webkit-min-device-pixel-ratio: 0)
{
    /* checkboxes */
    .rfdCheckbox input[type="checkbox"],
    .rfdCheckbox input[type="checkbox"][disabled]:hover
    {
        background-image: url('CheckBox/CheckBoxSprites.gif');
    }
}
  
/* the styling of radiobuttons and checkboxes in Safari and Chrome is already fully achieved with CSS */
@media screen and (-webkit-min-device-pixel-ratio: 0)
{
    /* checkboxes */
    #00ff00ZoneID1 input[type="checkbox"],
    #00ff00ZoneID1 input[type="checkbox"][disabled]:hover
    {
        background-image: url('CheckBox/CheckBoxSprites.gif');
    }
}

Please, I need your help,
It is appreciated to send me the modified code.

Regards,
Bader
Georgi Tunev
Telerik team
 answered on 06 Jan 2011
1 answer
74 views
I would like to specify a start date and an end date, say January 5, 2011 to February 5, 2011. Within this range, I'd like to only show it Mon-Wed, and Sat-Sun. Is there a way to create a single appointment with that start and end date and create some sort of RecurrenceRule for this, or do I have to do a lot of manual work to make this scenario a reality?
Nikolay Tsenkov
Telerik team
 answered on 06 Jan 2011
8 answers
230 views
Hi,

I am using loading panel on one of my page. The problem I am experiencing is strange. When page loads for the first time, loading panel is shown as desired. On another button loading panel is not displayed.

If I click second button first, then loading panel is shown and not shown on the first button where it showed previously.

In short, it shows loading panel once the page loads and then it does not show up.

Please let me know if you need any other information from my end.
Atit Thaker
Top achievements
Rank 1
 answered on 06 Jan 2011
2 answers
85 views
Hi

I have here the following problem, wonder if it is a known issue:

Have a page with RadTabStrip, tabs generated by TabTemplates with DataSource provided. Tab Strip is set to be shorter than required to display all tabs ==> thus scrolling is there. Also there is function set for OnClientLoaded event.
Under normal circumstances:
 1) Tabs are loaded,
 2) tab strip scrollbar is displayed,
 3) function for OnClientLoaded event fires as required.

Now - I have added a RadButton with Text and ImageURL properties set as well as OnClientClicked pointing to existing function.
When I run page now, I see that:
 1) Tabs are loaded,
 2) tab strip scrollbar is NOT displayed, and tabs are NOT scrollable
 3) function for OnClientLoaded event does NOT fire
 4) RadButton is shown

are these two controls are incompatible or I am missing something?
I can set up some small sample demo if needed for investigation

Thanks,
Dmitry
Cori
Top achievements
Rank 2
 answered on 06 Jan 2011
1 answer
125 views
i want to find the textbox..?
aspx page
<EditItemTemplate>
                                        <asp:TextBox ID="txtState" TabIndex="1" Enabled="true" runat="server" Text='<%#Eval("MA")%>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="reqFieldValGameState" runat="server" ErrorMessage="RequiredFieldValidator"
                                            ControlToValidate="txtState" Text="Please enter Game state."></asp:RequiredFieldValidator>
                                         <asp:CustomValidator ID="custmValState" runat="server" ControlToValidate ="txtState" OnServerValidate ="custmValState_ServerValidate"
                                        ErrorMessage="Invalid State."></asp:CustomValidator>
                                    </EditItemTemplate>

code behind
  protected void custmValState_ServerValidate(object sender, ServerValidateEventArgs e)
        {
            
            TextBox txtState = (TextBox)grdGameInfo.FindControl("txtState");
            string sGameState = txtState.Text;

            switch (sGameState.ToUpper())
            {
                case "MA":
                    e.IsValid = true;
                    break;
                case "DA":
                    e.IsValid = true;
                    break;
                default:
                    {
                        e.IsValid = false;
                        return;
                    }
            }
        }

How to find the textbox in edittemplate of grid . How to find the textbox ..above event is called OnServerValidate ="custmValState_ServerValidate"

Help Me urgent . how to find textbox  inside the "custmValState_ServerValidate"  function
Shinu
Top achievements
Rank 2
 answered on 06 Jan 2011
1 answer
238 views
How do I set the contenturl in this function?
I thought it would have been: pageView.contenturl = "blah", but this does not compile.

Private Sub AddTab(ByVal tabName As String)
        Dim tab As RadTab = New RadTab
        tab.Text = tabName
        radTabStrip.Tabs.Add(tab)
  
        Dim pageView As RadPageView = New RadPageView
        pageView.ID = tabName
        'pageView.
        RadMultiPage.PageViews.Add(pageView)
  
        radTabStrip.SelectedIndex = tab.Index
        radTabStrip.DataBind()
    End Sub
Shinu
Top achievements
Rank 2
 answered on 06 Jan 2011
1 answer
137 views
I am trying to use the ASP.NET AJAX File Explorer control.  The control loads fine initially, with the correct folders etc but when ever I click a folder to open, the waiting icon appears and then it hangs and the grid doesn't refresh.

I keep getting a Javascript error Sys.WebForms.PageRequestManagerParserErrorException 

I have pretty much copied the markup from the Live Demos page.  I am using the Q2 2009 ( I am unable to upgrade) controls with ASP.NET MVC 2 using Visual Studio 2010.

Can someone help me at all?

Thanks

Barry

Dobromir
Telerik team
 answered on 06 Jan 2011
2 answers
145 views
Hi,

 I am using RadCalendar in my app. While click on the particular date opening the RadWindow. In that RadWindow i am entering three values, After closing that window those entered values are displaying on the particular date.

Now in that main page RadCalendar Page : I have three textboxes...In that after closing that RadWindow. need to display the displayed values on the date....

ex: on the date 3 : has V=1, S=1, O=1 and date 7: has V=2 , S=1, O=2.

 Need to display those values and accumulate in to textboxes in the main pages
like:
  Vacation : 3
  Sick :2
 Other:3

Tell me how to do?
Maria Ilieva
Telerik team
 answered on 06 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?