Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
70 views
Firstly let me state my problem, which has recurred a lot of times over several years of telerik product usage.

Because Telerik tools are so reliable, I seldom upgrade. I have never had a problem within telerik tools being created by installing a newer version. Maybe I am unique in this, but I doubt it.
So, this brings me into a situation where I download and evaluate new versions very seldom, in regard to the release cycles.

The problem, is that there is no place, as far as I can see, where I can download ALL release notes between versions X and Y. Not that by stating as far as I can see I am intentionally leaving the door open for flames, being semi-blind, and a moron. I willingly agree to all this to get the list I need.

Because frequently (every 6mo or so) I find myself needing a bugfix or feature, and googling will show that the fix has been implemented in version X.
Like today, I was looking for radeditor width fix in IE8 and FF4.
http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-width-problem.aspx
So. Then I find that it is indeed possible to update, and my specific problem has already been fixed.
Now in order to evaluate my update from earlier versions, I can tell that the version I have is Y (Q2 2010) from the excellent version listing at:
http://www.telerik.com/products/aspnet-ajax/whats-new/release-history.aspx

In order to evaluate, I would need to find all applicable changenotes, in ONE GO, and then evaluate those against the used features in our current err 9 sites.
However, there is no apparent or easy way to find all radeditor only applicable release or change notes between Q2 2010 and Q3 2010 SP1.
I always go for the latest to alleviate my next need for a fix.

Without a means to do this, I manually have to compile a huge list of changes, then evaluate the radeditor specific changes against my sharepoint 2007, 9 existing sites and each of their used features. They all have separate custom editor toolfiles, skins, css files, everything.

Otherwise of course I won't get the stakeholders (site owners and editors) approval for the new version. By the time I get agreement there's probably a new version out again.
And, yes, this is in part due to our being a government entity.
Then there's deployment, testing, integration testing, QA testing and production.


So, please Telerik take into consideration a way to make documentation regarding changes available for customers with valid support contracts at least, where some page would pull change and fix notes from version  X upgrading to version Y, for download or reading.

At least in customers with multiple stakeholders and formal approval processes, this would REALLY make my day. Err year. And next year too.
Pavel
Telerik team
 answered on 18 Jan 2011
1 answer
85 views
I have a basic menu placed on a page with the menu being loaded in the Page_Load event.  Currently, whenever I start the menu in the latest IE or Firefox, only the last menu item (furthest to the right) is visible and selectable.  The rest of the menu does not appear until after I either resize the browser or hover over the last menu item, then the menu appears and works correctly going forward.

The page is fairly simple and is as follows:
<form id="form1" runat="server" style="height:100%;width:100%;">
  
<telerik:RadScriptManager ID="ScriptManager" runat="server" />
<div style="margin:0; width:100%; display:block; background-color:Black;">
    <telerik:RadMenu ID="RadMenuMain" runat="server" EnableRoundedCorners="true" EnableShadows="true" OnClientItemClicked="menuItemClicked">
    </telerik:RadMenu>
</div>
<iframe id="Iframe1" scrolling="auto" width="100%" height="100%" frameborder="0">
</iframe>
</form>

Any help or ideas are welcome.

Thank you.
Justin
Top achievements
Rank 1
 answered on 18 Jan 2011
1 answer
90 views
I just upgraded to the latest release ASP.NET AJAX Q3 v2010.3.1317.40.
When I right click on a scheduler item to access the menu, I get the following error:

"Microsoft JScript runtime error: 'findItemByValue(...)' is null or not an object"

And debugging takes me to this line in ScriptResource.axd...
"l.findItemByValue("CommandEdit").set_enabled(true);"

Any ideas? Thanks for any info.

Peter
Telerik team
 answered on 18 Jan 2011
1 answer
177 views
Hi,

I have created a combo box that has custom item template. Each item is visualized as a checkbox and the value is kept as a hidden field, also inside the item template. The purpose is to allow multiple items to be selected at once (don't ask why, it was a client requirement). Also, we should not do any postback to the sever on each selection, instead, when the server code first attempts to get the selected items, each item is looped and depending on the state of the checkbox, a collection of selected items is being assembled. So far, everything works as expected, but the only issue I am having is when I click on the label of a checkbox item, or on the page right after blurring the items list, a postback event occurs. I have set both the RadComboBoxand the checkboxes AutoPostBack to 'false'. Any idea where this postback comes from and a way to disable it?

Here is a quick code example:
<telerik:RadComboBox ID="RadComboBox" runat="server" AllowCustomText="false" AutoPostBack="false">
    <ItemTemplate>
        <asp:CheckBox
            ID="CheckBox"
            runat="server"
            Text='<%# Eval(DataTextField ?? "Text") %>'
            AutoPostBack="false"
            ClientIDMode="Predictable"
            />
        <asp:HiddenField ID="HiddenField" runat="server" Value='<%# Eval(DataValueField ?? "Value") %>' ClientIDMode="Predictable" />
        <asp:HiddenField ID="CheckedHiddenField" runat="server" Value='False' ClientIDMode="Predictable" />
    </ItemTemplate>
</telerik:RadComboBox>

Here is how I collect the items:

private ICollection<RadComboBoxItem> GetItems()
        {
            return RadComboBox.Items.Aggregate(
                new List<RadComboBoxItem>(),
                (list, item) =>
                {
                    var checkBox = item.Controls.OfType<CheckBox>().First();
                    var hidden = item.Controls.OfType<HiddenField>().First();
                    var selectedHidden = item.Controls.OfType<HiddenField>().Last();
 
                    if (bool.Parse(selectedHidden.Value))
                    {
                        list.Add(new RadComboBoxItem(checkBox.Text, hidden.Value) { Selected = true });
                    }
                    return list;
                });
             
        }

And here is the clientside function that I am attaching to the checkbox event:
protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
             
            RadComboBox.Items.ToList().ForEach(ProcessItem);
        }
 
        private void ProcessItem(RadComboBoxItem item)
        {
            var checkbox = item.Controls.OfType<CheckBox>().Single();
            var hidden = item.Controls.OfType<HiddenField>().First();
            var selectedHidden = item.Controls.OfType<HiddenField>().Last();
            checkbox.InputAttributes["onchange"] = string.Format(
                "multiselectComboBoxItemClick('{0}', '{1}', '{2}', '{3}', '{4}');",
                RadComboBox.ClientID,
                checkbox.ClientID,
                hidden.ClientID,
                selectedHidden.ClientID,
                checkbox.Text);
        }
and the js code:
function multiselectComboBoxItemClick(comboBoxID, checkBoxID, valueHiddenFieldID, stateHiddenFieldID, itemText) {
    var combo = $find(comboBoxID);
    var checkbox = document.getElementById(checkBoxID);
    var hidden = document.getElementById(valueHiddenFieldID);
    var selectedHidden = document.getElementById(stateHiddenFieldID);
 
    if (!combo || !checkbox || !hidden) {
        return;
    }
 
    if (!combo['__SelectedItems']) {
        combo['__SelectedItems'] = [];
    }
    if (!combo['__SelectedItemsMap']) {
        combo['__SelectedItemsMap'] = {};
    }
 
    var value = hidden.value.toString();
                         
    if (checkbox.checked == true) {
        var item = combo['__SelectedItemsMap'][value];
        if (!item) {
            item = new Telerik.Web.UI.RadComboBoxItem();
            item.set_text(itemText);
            item.set_value(value);
            combo['__SelectedItemsMap'][value] = item;
            Array.add(combo['__SelectedItems'], item);
        }
        selectedHidden.value = 'True';
    } else {
        var item = combo['__SelectedItemsMap'][value];
        if (item) {
            var index = $telerik.$.inArray(item, combo['__SelectedItems']);
            if (index != -1) {
                combo['__SelectedItems'].splice(index, 1);
                combo['__SelectedItemsMap'][value] = null;
            }
        }
        selectedHidden.value = 'False';
    }
 
    var text = '';
    if (combo['__SelectedItems'].length > 0) {
        text = combo['__SelectedItems'][0].get_text();
        for (var i = 1; i < combo['__SelectedItems'].length; i++) {
            text = text + ', ' + combo['__SelectedItems'][i].get_text();
        }
    }
    combo.set_text(text);
}
Simon
Telerik team
 answered on 18 Jan 2011
2 answers
181 views
I am using a menu control to track a 5 step process where the user views 5 web pages. The menu corresponds to the 5 pages but I am using the menu as "step 1", "step2", etc..

So when the user views a page, I want the corresponding menu graphic to show as completed. This would mean that by the time they reach step 5/page 5 ...all of the menu steps will show the completed graphic for the menu item

Every time the user views one of the pages, I was just going to write a bool to a cookie. Here is an example:

   public Boolean Step1Status
        {
            get
            {
                if (HttpContext.Current.Request.Cookies["Step1"] != null)
                {
                    return Convert.ToBoolean(HttpContext.Current.Request.Cookies["Step1"].Value);
                }
                else
                {
                    return false;
                }

            }
            set
            {
                //Write Cookie &  Timeout
                HttpCookie StepStatus = new HttpCookie("Step1");
                StepStatus.Value = value.ToString();                
                HttpContext.Current.Response.Cookies.Add(StepStatus);
            }
        }
Then I was going to write an if statement that checks to see if  each of the steps exist and for the ones that do exist, change:
currentItem.Selected = true;

How do I get each of the menu items so I can set its selected value to true?

Also, is this over complicating things or is there a better way to track the pages the user has viewed and change the menu item to a different graphic?

Thanks for any advice.


MissioDei
Top achievements
Rank 1
 answered on 18 Jan 2011
2 answers
212 views
What can I do to address this issue?

Thanks.



<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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></title>
    <style type="text/css">
       
          
        .myRadButton.rbToggleButton
        {
            color: #000;
            font-size: 10px !important;
            text-decoration: none !important;
        }
          
        .myRadButton.rbToggleButton:hover
        {
            color: #863d02;
        }
          
        .myRadButton.rbToggleButton .rbText
        {
            text-align: left !important;
            padding-left: 20px !important;
            font-size: 10px !important;
        }
          
        .myRadButton.rbToggleButton.rbDisabled, .myRadButton.rbToggleButton:hover
        {
            color: #6a6a6a;
            font-size: 10px !important;
            text-decoration: none !important;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadButton ID="btnOffice" runat="server" ButtonType="ToggleButton" ToggleType="CustomToggle"  CssClass="myRadButton" Enabled=false
       Width="100%" Text="CheckBox">
        <ToggleStates>
            <telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckbox"
                Text="test" />
            <telerik:RadButtonToggleState PrimaryIconCssClass="rbToggleCheckboxChecked"
                Text="test" />
        </ToggleStates>
    </telerik:RadButton>
    </form>
</body>
</html>
Adam
Top achievements
Rank 1
 answered on 18 Jan 2011
3 answers
248 views
I have a RadUpload that always shows exactly one upload field.  I have a requirement to clear the input field from elsewhere on the page.  The input element should still remain (if I have to temporarily "delete" it and then remake it, that is ok as long as it still works with postback, e.g. if it has the same clientid), and remain usable, just without the file that was previously selected there.  Is there an easy way to do this with Telerik's clientside api, or do I need to get dirty with raw dhtml?  I should not use IE specific features.


Telerik.Web.UI.dll 2010.2.713.35
Simon
Telerik team
 answered on 18 Jan 2011
1 answer
213 views

I am trying to use the RadListView OnLoad event to set the page index from session much like I am doing with a RadGrid. However, despite the fact I have the event handler defined the code does not fire. If I remove the code in my code behind, but leave the onload declaration on the tag it balks about it not being present. I finally went to a test project and just did a simply test below of the onload. It still will not execute. Am I missing something in how the list view onload works? Thanks.

protected void rlvForecastCardView_Item_Load(object sender, EventArgs e)
{
    Response.Write("Test Text");
}
Tsvetina
Telerik team
 answered on 18 Jan 2011
1 answer
93 views
Hello In my page i use the recurrence control and calender control but some time it's not working . IF recurrence control working then date control not work . Sometimes date control work but recurrence control not work  

I was unable to find out the  problem exactly where occured.

Please see following code.
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Clinics.ascx.cs" Inherits="DesktopModules_JCVideo_Clinics" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke" Namespace="DotNetNuke.UI.WebControls" %>
<%@ Register TagPrefix="dnn" TagName="Profile" Src="~/DesktopModules/Admin/Security/Profile.ascx" %>
 
 
     
  
     
        <div id="FacilityTabs" runat="server">
            <telerik:RadTabStrip ID="StudentTabs" runat="server" MultiPageID="RadMultiPage1"
                SelectedIndex="3" Align="Left" ReorderTabsOnSelect="true" Skin="Telerik" OnTabClick="FacilityTabs_TabClick">
                <Tabs>
                    <telerik:RadTab Text="Edit Schedule">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Edit Settings">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Edit Students">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Clinics">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Add/Update Instructor">
                    </telerik:RadTab>
                    <telerik:RadTab Text="Facilities">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
        </div>
        <div style="border-style: solid; border-color: Silver; border-width: thin; background-color: White;
            padding: 10px 10px 10px 10px">
            <table width="100%" class="table1">
                <tr>
                    <td style="height: 40px">
                        <table>
                            <tr>
                                <td colspan="2" style="font-size: 11pt; color: Gray">
                                    <strong>Clinics</strong>
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt">
                                    Select A Clinic To Edit:
                                </td>
                                <td>
                                    <telerik:RadComboBox ID="ddlClinics" runat="server" Height="140px" AutoPostBack="true"
                                        OnSelectedIndexChanged="ddlClinics_SelectedIndexChanged">
                                    </telerik:RadComboBox>
                                </td>
                                <td>
                                    <asp:Button ID="btnAddNew" runat="server" Text="Add New Clinic" OnClick="btnAddNew_Click"
                                        Width="119px" />
                                    <asp:Button ID="btnCancelAdd" runat="server" Text="Cancel" OnClick="btnCancelAdd_Click"
                                        Width="55px" Visible="False" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-left: 15px; padding-right: 15px">
                        <div style="border-bottom-color: Silver; border-bottom-style: solid; border-bottom-width: thin;
                            height: 1px; width: 100%">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Clinic Title
                                            </td>
                                            <td>
                                                <telerik:RadTextBox runat="server" ID="txtTitle">
                                                </telerik:RadTextBox>
                                                <%--<asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Clinic Location
                                            </td>
                                            <td>
                                                <telerik:RadComboBox runat="server" Height="140px" ID="ddlLocation" AutoPostBack="true">
                                                </telerik:RadComboBox>
                                                <%--<asp:TextBox ID="txtLocation" runat="server"></asp:TextBox>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Clinic Price Per Student
                                            </td>
                                            <td>
                                                <telerik:RadNumericTextBox runat="server" ID="txtPrice">
                                                </telerik:RadNumericTextBox>
                                                <%-- <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Clinic Description
                                            </td>
                                            <td>
                                                <telerik:RadTextBox runat="server" ID="txtDescription" TextMode="MultiLine" Height="40px">
                                                </telerik:RadTextBox>
                                                <%-- <asp:TextBox ID="txtDescription" runat="server"></asp:TextBox>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Max # Of Students
                                            </td>
                                            <td>
                                                <telerik:RadNumericTextBox runat="server" ID="txtMaxStudent">
                                                </telerik:RadNumericTextBox>
                                                <%--<asp:TextBox ID="txtMaxStudent" runat="server"></asp:TextBox>--%>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnSave" runat="server" Text="Save\Update Clinic" OnClick="btnSave_Click" />
                                            </td>
                                            <td>
                                                <asp:Button ID="btnCancel" runat="server" Text="Cancel Clinic" OnClick="btnCancel_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Clinic Start Date
                                            </td>
                                            <td>
                                                <telerik:RadDateTimePicker ID="dtpStartDate" runat="server">
                                                </telerik:RadDateTimePicker>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style="font-size: 8pt">
                                                Clinic End Date
                                            </td>
                                            <td>
                                                <telerik:RadDateTimePicker ID="dtpEndDate" runat="server" OnSelectedDateChanged="dtpEndDate_SelectedDateChanged">
                                                </telerik:RadDateTimePicker>
                                            </td>
                                        </tr>
                                        <%-- <tr>
                                    <td style="font-size: 8pt">
                                        Recurring?
                                    </td>
                                    <td>
                                         
                                    </td>
                                </tr>--%>
                                        <tr>
                                            <td colspan="2">
                                                <telerik:RadSchedulerRecurrenceEditor ID="RecClinic" runat="server" Visible="true"
                                                    Width="550px">
                                                </telerik:RadSchedulerRecurrenceEditor>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-left: 15px; padding-right: 15px">
                        <div style="border-bottom-color: Silver; border-bottom-style: solid; border-bottom-width: thin;
                            height: 1px; width: 100%">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <table>
                                    <tr>
                                        <td colspan="2" style="font-size: 8pt">
                                            <strong>Assign Instructor(s)</strong>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="font-size: 8pt">
                                            Available Instructors:
                                        </td>
                                        <td style="font-size: 8pt">
                                            Assigned Instructor(s) / Salary For Event:
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <%--  <telerik:RadListBox ID="lstbxInstructor" runat="server" DataTextField="Name"
                            Height= "140px"
                            DataValueField="InstructorID">
                            </telerik:RadListBox>--%>
                                            <asp:ListBox ID="lstbxInstructor" Height="140px" DataTextField="Name" DataValueField="InstructorID"
                                                runat="server"></asp:ListBox>
                                        </td>
                                        <td style="font-size: 8pt">
                                            <telerik:RadGrid ID="grdInstructor" runat="server" Width="450px" AutoGenerateColumns="false"
                                                ShowGroupPanel="false" HeaderStyle-Height="0px" OnItemCommand="grdPackage_ItemCommand"
                                                AllowPaging="true" GridLines="Both" AllowSorting="true" BorderStyle="None" Skin="Simple"
                                                ShowHeader="true">
                                                <PagerStyle Mode="NextPrevAndNumeric" />
                                                <MasterTableView EditMode="InPlace" DataKeyNames="InstructorId,Name,ClinicInstructorId,CutRate"
                                                    Width="100%" CommandItemDisplay="None">
                                                    <Columns>
                                                        <telerik:GridTemplateColumn HeaderText="Name">
                                                            <HeaderStyle Width="150px" ForeColor="GrayText" />
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblpkName" Text='<%# Eval("Name")%>' runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <asp:Label ID="txtpkName" Text='<%# Eval("Name")%>' runat="server"></asp:Label>
                                                            </EditItemTemplate>
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridTemplateColumn HeaderText="Price">
                                                            <HeaderStyle Width="150px" ForeColor="GrayText" />
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblPrice" Text='<%# Eval("CutRate")%>' runat="server"></asp:Label>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <asp:TextBox ID="txtPrice" Text='<%# Eval("CutRate")%>' runat="server">
                                                                </asp:TextBox>/Hour
                                                            </EditItemTemplate>
                                                            <ItemStyle HorizontalAlign="Left" />
                                                        </telerik:GridTemplateColumn>
                                                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"
                                                            AutoPostBackOnFilter="true" HeaderText="Edit" EditImageUrl="../Images/edit.gif">
                                                            <HeaderStyle Width="30px" />
                                                            <ItemStyle CssClass="MyImageButton" />
                                                        </telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn ConfirmText="Delete this Instructor?" ConfirmDialogType="RadWindow"
                                                            ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                                                            UniqueName="DeleteColumn" HeaderText="Delete" ImageUrl="../Images/action_delete.gif">
                                                            <HeaderStyle Width="30px" />
                                                            <ItemStyle HorizontalAlign="Center" CssClass="MyDelImageButton" />
                                                        </telerik:GridButtonColumn>
                                                    </Columns>
                                                </MasterTableView>
                                            </telerik:RadGrid>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Button ID="btnAssign" Text="Assign Instructor" runat="server" OnClick="btnAssign_Click">
                                            </asp:Button>
                                        </td>
                                        <td>
                                            <%--<asp:Button ID="btnsavesal" Text="Save\Update Salary" runat="server"></asp:Button>--%>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                            <Triggers>
                                <asp:PostBackTrigger ControlID="btnAssign" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </td>
                </tr>
            </table>
        </div>
        <telerik:RadSchedulerRecurrenceEditor ID="RecEditSave" runat="server" Visible="false"
            Width="550px">
        </telerik:RadSchedulerRecurrenceEditor>
        <asp:Button runat="server" ID="hiddenTargetControlForEditModalPopup" Style="display: none" />
        <cc1:ModalPopupExtender runat="server" ID="modPopExtForEditInformation" TargetControlID="hiddenTargetControlForEditModalPopup"
            PopupControlID="divMoreInfo" BackgroundCssClass="modalBackground" CancelControlID="btnpopupOk"
            PopupDragHandleControlID="programmaticPnlEditCompany">
        </cc1:ModalPopupExtender>
<div id="divMoreInfo" visible="false" runat="server" style="display: none; background-color: white;
    width: 260px; height: 150px; border-width: 3px; border-style: solid; border-color: Black;">
    <div>
        <table cellpadding="10px">
            <tr>
                <td colspan="2" style="background-color: Silver;">
                    <b>
                        <asp:Label ID="lblmessageHeader" Text="Edit Lesson Time" runat="server" /></b>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblMessage" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Button ID="btnpopupOk" runat="server" Text="OK" />
                </td>
            </tr>
        </table>
    </div>
</div>



Please help me urgent ..Hello No one got this type of problem please let me knoww..
Maria Ilieva
Telerik team
 answered on 18 Jan 2011
13 answers
192 views
Hi,

I have a problem with closing the radwindow control by pressing any key of the keyboard.

Here is my code:
"

<

 

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

 

head runat="server">

 

 

 

<title></title>

 

 

 

<script language="javascript" type="text/javascript">

 

 

 

function GetRadWindow() {

 

 

 

var oWindow = null;

 

 

 

if (window.radWindow)

 

oWindow = window.RadWindow;

 

//Will work in Moz in all cases, including clasic dialog

 

 

 

else if (window.frameElement.radWindow)

 

oWindow = window.frameElement.radWindow;

 

//IE (and Moz as well)

 

 

 

return oWindow;

 

}

 

 

function Close(evt) {

 

 

 

if ((evt.keyCode >= 0) && (evt.keyCode <= 127))

 

GetRadWindow().Close();

}

 

 

 

</script>

 

 

 

<style type="text/css">

 

 

 

#bg {position:absolute; }

 

 

 

#content {position:relative; z-index:2;}

 

 

 

#LayerPanel1 {position:relative; z-index:1;}

 

 

 

</style>

 

 

 

<script type="text/javascript">

 

 

 

function OnClientInitialize(dock, args) {

 

 

 

var divMap = $get("bg");

 

divMap.appendChild(dock.get_element());

}

 

 

</script>

 

</

 

 

head>

 

<

 

 

body onkeypress="Close(event)">

 

 

 

<form id="form1" runat="server">

 

 

 

<div>

 

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server" />

 

 

 

<asp:Panel ID="Panel2" Width="100%" Height="100%" runat="server" >

 

 

 

<asp:Panel ID="bg" Height="100%" style="margin-left:-10px; margin-top:-10px;" Width="100%" runat="server" >

 

 

 

<asp:Image ID="CMapImage" Width="100%" Height="150%" runat="server" />

 

 

 

</asp:Panel>

 

 

 

<asp:Panel ID="LayerPanel1" runat="server">

 

 

 

<telerik:RadDockLayout ID="RadDockLayout1" runat="server">

 

 

 

 

</telerik:RadDockLayout>

 

 

 

</asp:Panel>

 

 

 

<asp:Panel ID="content" Width="100%" Height="60px" runat="server">

 

 

 

<asp:Panel ID="EscPanel" runat="server">

 

 

 

</asp:Panel>

 

 

 

</asp:Panel>

 

 

 

</asp:Panel>

 

 

 

</div>

 

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>

 


"

But unfortunatily it is not working. Only by pressing the Esc key the radwindow control is closed unlike the requirements.

Please, I need your help in order to close the radwindow control by pressing any key.
It is appreciated to send me the modified code.

Regards,
Bader
Svetlina Anati
Telerik team
 answered on 18 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?