Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
1.1K+ views

Since I don't require all the functionality of the RadComboBox, I'm migrating several of my RadComboBox
controls over to the new RadDropDownList...but I'm having issues clearing the "text" portion of the
control via client-side script.

When using ComboBox, my client-side script to clear the control was,

resultsComboBox.trackChanges();
resultsComboBox.clearSelection();
resultsComboBox.clearItems();
resultsComboBox.commitChanges();

Now that I'm using DropDownList, my client-side script is,

resultsDropDownList.trackChanges();
resultsDropDownList.get_items().clear();
resultsDropDownList.commitChanges();

This clears the DropDownListCollection fine, but leaves the "selected" item in the top-level box.

Is there a DropDownList equivalent for the ComboBox clearSelection() client-side method?  I've tried setting the default message via
set_defaultMessage("xx") method...but no luck.  Any suggestions?  Thanks.
David
Top achievements
Rank 1
 answered on 13 Aug 2013
2 answers
230 views
Can someone tell me how I can find a control in ContentTemplate of a RadContentTemplateTile?
For example: I have a RadTile with 3 RadContentTemplateTiles in one group. In each RadContentTemplateTile, I have a RadioButton. I want the RadioButton checked when the tile is selected and unchecked if the tile is not selected.

Thank you!
Josh
Top achievements
Rank 1
 answered on 13 Aug 2013
7 answers
211 views
I’m
experiencing a very strange behavior from Textboxes that are using the
RadFormDecorator. When the page opens, the text boxes look great, but when I
move the mouse on top of them, they change their size. Thanks for the help,

-Sam

<%@ Page Title="Edit Category" Language="VB" MasterPageFile="~/Application/MasterPage2.master"  AutoEventWireup="false" CodeFile="CategoryEdit.aspx.vb" Inherits="Application_CategoryEdit" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" Skin="Metro">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel2"
        EnablePageHeadUpdate="False">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="SubmitButton">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="SubmitButton" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
     
    <div style="font-size: .9em">
        <telerik:RadTabStrip ID="TabStrip" runat="server" MultiPageID="MultiPage" SelectedIndex="0"
            Skin="Outlook">
            <Tabs>
                <telerik:RadTab runat="server" PageViewID="GeneralPage" Text="General Information"
                    Value="GeneralTab" Selected="True">
                </telerik:RadTab>
                <telerik:RadTab runat="server" PageViewID="DetailPage" Text="Forecast Details" Value="DetailTab">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
        <telerik:RadMultiPage ID="MultiPage" runat="server" SelectedIndex="0">
            <telerik:RadPageView ID="GeneralPage" runat="server" Selected="true">
                <table>
                    <tr>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Category Name
                        </td>
                        <td>
                            <telerik:RadTextBox ID="NameTextBox" runat="server" Skin="" Width="350px">
                            </telerik:RadTextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="NameTextBox"
                                Display="Dynamic" ErrorMessage="Category name is required" Text="<img alt='Information required' src='../Images/Error.gif' />">
                            </asp:RequiredFieldValidator>
                        </td>
                        <td>
                              
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Description
                        </td>
                        <td>
                            <telerik:RadTextBox ID="DescriptionTextBox" runat="server" Skin="" Width="350px">
                            </telerik:RadTextBox>
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Unit of Measurement
                        </td>
                        <td>
                            <telerik:RadComboBox ID="UOMComboBox" runat="server">
                            </telerik:RadComboBox>
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                    </tr>
                    <tr>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                    </tr>
                </table>
            </telerik:RadPageView>
            <telerik:RadPageView ID="DetailPage" runat="server">
                <table width="100%">
                    <tr>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                        <td>
                              
                        </td>
                    </tr>
                </table>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
        <table class="BottomTable">
            <tr>
                <td>
                    <asp:Button ID="SubmitButton" runat="server" Text="Submit" CommandName="Submit" />
                </td>
                <td style="text-align: right">
                    <asp:Button ID="CancelButton" runat="server" Text="Cancel" CommandName="Cancel" OnClientClick="return CancelAll();" />
                </td>
            </tr>
        </table>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please Submit All Required Information"
            ShowMessageBox="True" ShowSummary="False" />
    </div>
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script type="text/javascript">
            //***********************************************************************************************
            function CloseAndRebind(Msg, CatID) {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.CategoryEdit_Completed(CatID);
            }
 
            function AlertAndClose(args) {
                alert(args);
                GetRadWindow().Close();
            }
 
            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow;
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
                return oWindow;
            }
 
            function CancelAll() {
                GetRadWindow().Close();
            }
 
            //***********************************************************************************************
        </script>
    </telerik:RadCodeBlock>
</asp:Content>
<%@ Master Language="VB" CodeFile="MasterPage2.master.vb" Inherits="Application_MasterPage2" %>
<%@ 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>2forecast</title>
    <link href="../StyleSheet.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body class="BodyStyle5">
    <form id="form1" runat="server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Textbox"
        Skin="Outlook" />
    <div style="font-size: .85em;">
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </div>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Silk" Modal="True"
        Overlay="True" ShowContentDuringLoad="False" VisibleStatusbar="False" ReloadOnShow="True"
        IconUrl="~/Images/2Forecast_16.png" KeepInScreenBounds="true" AutoSize="False"
        Behaviors="Resize, Close, Maximize, Move, Reload" EnableShadow="True" Style="z-index: 9000">
        <Windows>
            <telerik:RadWindow ID="SmallSizeDialog" Title="" runat="server" Height="300px" Width="700px">
            </telerik:RadWindow>
            <telerik:RadWindow ID="MidSizeDialog" Title="" runat="server" Height="500px" Width="700px">
            </telerik:RadWindow>
            <telerik:RadWindow ID="LargeSizeDialog" Title="" runat="server" Height="700px" Width="900px">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </form>
</body>
</html>
Sam
Top achievements
Rank 1
 answered on 13 Aug 2013
1 answer
136 views
I need to produce a 'radar chart' for a client.  This is basically a line chart with points plotted on a polar coordinate plot area (vs. cartesian).  Is this possible, either with HTMLChart or the older chart?  I'm not seeing it in the examples.
Danail Vasilev
Telerik team
 answered on 13 Aug 2013
3 answers
92 views
Dear Team,

We are using Telerik Rad Control of version 2011.2.712.40.

Recently, our browser upgraded to IE 10 and the rad context menu is not showing up on first mouse click but shows up on the subsequent clicks. On the console, it shows the following issue:

Telerik.Web.UI.WebResource.axd, line 166 character 2
SCRIPT5007: Unable to get property 'documentElement' of undefined or null reference
Telerik.Web.UI.WebResource.axd, line 166 character 2


This problem occurs in IE 10 only.

Kindly suggest us a fix for this issue.
Vessy
Telerik team
 answered on 13 Aug 2013
1 answer
68 views
Hi,

I have a load on demand tool tip for appointments in Radscheduler. Sometimes, these tool tips do not work in Month and Week View.
When I hover over an appointment, it does not fire   "OnClientBeforeShow" client event.

   <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" Animation="Fade"  
                                            HideEvent="LeaveTargetAndToolTip"   OnClientBeforeShow="clientBeforeShow"  AutoTooltipify="true"  OnClientHide="OnClientHide"   > 
                        </telerik:RadToolTipManager>


  //Sets Appointment tooltip 
              function clientBeforeShow(sender, eventArgs) {
                  var height = $telerik.$(sender.get_contentElement())[0].scrollHeight;
                  var width = $telerik.$(sender.get_contentElement())[0].scrollWidth;
                  //PK 07/30/2013  MWF-543 Load on demand tooltip
                  //var contentText =  sender._text;

                 //Donot send request to webservice if tooltip is null and display subject/default text
                 var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
                 if (tooltip == null) {
                     SetToolTipPositionAndText(sender, sender._text);
                     return;
                 }

                  var element = tooltip.get_targetControl();
                  var appt = $find("<%=rsTicketsSchedule.ClientID %>").getAppointmentFromDomElement(element);
                  var apptID = appt.get_id();
                  //Donot send request to webservice if apptID is null and display subject/default text
                   if (apptID == null) {
                       SetToolTipPositionAndText(sender, sender._text);
                      return;
                  }
                  
                  var baseUrl = 'WorkforceServices/RequestHandler.ashx?q=gettooltipforappointment&ApptID=' + apptID;   

             
                  var serviceOptions = {};
                  serviceOptions.url = baseUrl;
                  serviceOptions.data = null;
                  serviceOptions.type = 'POST';
                  serviceOptions.processData = true;
                  serviceOptions.contentType = "application/json";
                  serviceOptions.dataType = 'json';
                  serviceOptions.success = function (result) {
                      var contentText = result.message;
                      SetToolTipPositionAndText(sender,contentText);
                  };
                  serviceOptions.error = function (xhr) {
                      alert(xhr.statusText);
                      SetToolTipPositionAndText(sender, "" );
                  };

                  var workforceServiceProxy = new WorkforceServiceProxy(serviceOptions);
                  workforceServiceProxy.callService();  
              }


Any ideas?

Thanks,
Prava
 
Boyan Dimitrov
Telerik team
 answered on 13 Aug 2013
0 answers
47 views
I inherited a MOSS environment and I need to change the top navigation menu, I see that the navigation is using a RADMenu
<telerik:radmenu ID="TopNavMenu" runat="server" ExpandDelay="10" CollapseDelay="10"/>

But I can't find where its generating the menu from, I have checked SharePoint Navigation, fix links and no trace of sitemap. Please help me identify where the menu is being generated from so that I can be able to edit it.

Thanks
Lonsrd
Top achievements
Rank 1
 asked on 13 Aug 2013
1 answer
114 views
Hi,


I am developing  a sharepoint webpart  i want to load controls asynchronously within sharepoint webpart. One of the controls I use is ASP.net AJAX RADPivotgrid.

i Achieved this by using of  Partial Updatepanel Library.i followed this link to load controls asynchronously.(link:http://www.51aspx.com/CodeFile/PartialUpdatePanel,6051/Control/PanelHostPage.cs.html)

But now i click Filter icon in pivotgrid it gets a  postback and filter window is not opened.

When i click filter icon i want to open the Filter window asynchronously.

Code:

 private void ProcessPostBackControls(Control control)
        {
            if (control is RadComboBox)
            {
                if ((control as RadComboBox).OnClientSelectedIndexChanged.Equals("Telerik.Web.UI.Grid.ChangePageSizeComboHandler"))
                {
                    (control as RadComboBox).OnClientSelectedIndexChanged = "sppds_gridPageSizeChanged";
                }
            }
            else if (control is Button)
            {
                    if (!(((Button)control).CssClass.Equals("rgFilter")) && !(((Button)control).CssClass.Equals("rpgFilter")))
                    {
                        ((Button)control).OnClientClick = GetPostBackReference(control.ClientID.Replace('_', '$'), "null", true);
                        ((Button)control).OnClientClick += "return false;";
                    }
            }
            else if (control is ImageButton)
            {
                    ((ImageButton)control).OnClientClick = GetPostBackReference(control.ClientID.Replace('_', '$'), "null", true);
                    ((ImageButton)control).OnClientClick += "return false;";
            }

            foreach (Control child in control.Controls)
                ProcessPostBackControls(child);
        }

The above code works fine for radgrid Filtering and paging but does not work for Pivotgrid Filtering.


Am i missing anything here?
please help me to resolve this issue.
Tsvetoslav
Telerik team
 answered on 13 Aug 2013
1 answer
97 views
Hi Telerik Users and Telerik Team,

i am facing exactly the same behavior as described by Maxims Post
[http://www.telerik.com/community/forums/aspnet-ajax/grid/height-isn-t-correct-if-grid-set-as-visible-at-ajax-request.aspx].
All of his Pictures match my situation.

But it is not only a height-rendering-problem, the colgroups-width is to small (i assume Maxims cols width is fixed, mine is auto-sized).

At first: 
I have a Webapplication (ASP.Net Framework 4), i have installed the latest build of Telerik asp.net controls. I am using radAjaxpanels.
The Parts of the Webapp are loaded via .ascx-controls in an asp-panel. The loading itself is ajaxfied. Everthing works pretty fine so far.
I have no javascript-errors or stuff like this, which could cause the inccorect rendering.
The render-problems appear in all browsers in the same way (i have tested with IE, FF, Chrome - all latest versions)

The incorrect rendering:
Whenever the radGrid's first appearance in a session is created via ajax-request, the rendering-problems as described by Maxim happen.
From now on this behavior wont come back, it appears only once. I can jump through the application and everthing renders correctly.

Whenever the radGrid's first appearance in a session is created via (full) postback, the incorrect behavior will never happen.

I allready set the grids property 'EnableAjaxSkinRendering' to true and i tried the sender.repaint()-method on the client-event 'OnGridCreated'. However this doesn't affect the incorrect rendering.

My thoughts on this are:
With some client-side alerts i can see that whenever the radGrid's first appearance is created via ajax-request,
the sizing of radgrid happens befor the styles are assigned (see the Without-styles.png from Maxim). 
So after sizing the styles get assigned and now the size-properties are inccorect.


My Questions:
Is there an appropriate event after the styles for radgrid are assigned?
I would try some stuff at this point to check if my thoughts are leading to the right direction.

Do you have any other suggestions how i could handle this behavior?

Greetings Philipp
Eyup
Telerik team
 answered on 13 Aug 2013
2 answers
108 views

Hi,

 I have a master page with an update panel. The update panel is refreshed periodically by a timer.
On a child page I have RadWindowManger and I open a RadWindow of that page.

When the an Ajax call is made to update the update panel on the master page the RadWindow closes. I tested and verified that the call is an Ajax call on the master page and not a full postback.

This is the update panel on master page:
<asp:UpdatePanel runat="server" ID="pnlWorldTime" UpdateMode="Conditional" >
   <ContentTemplate>
       <asp:Timer runat="server" ID="tWorldClock" Interval="10000" OnTick="tWorldClock_Tick" />
       <asp:Literal ID="ltrWordTime" runat="server"></asp:Literal>
       <asp:HiddenField ID="hfRadWindowOpen" runat="server" />
   </ContentTemplate>
</asp:UpdatePanel>

This is the RadWindowManger on the child page:

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Modal="true" VisibleStatusbar="false"
    AutoSize="true" ShowContentDuringLoad="false" Behaviors="Resize, move, Close" Skin="DD"
    EnableEmbeddedSkins="false" EnableTheming="true"  DestroyOnClose="true" OnClientClose="OnClientClose">
    <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server"  />
    </Windows>
    <AlertTemplate>
        <div class="alert-icon"></div>
        <div class="rwDialogPopup radalert">
            <div class="rwDialogText">
                {1}
            </div>
            <div class="alert-button">
                <a onclick="$find('{0}').close();" class="rwPopupButton" href="javascript:void(0);">
                    <span class="rwOuterSpan"><span class="rwInnerSpan">##LOC[OK]##</span> </span>
                </a>
            </div>
        </div>
    </AlertTemplate>
    <ConfirmTemplate>
        <div class="rwDialogPopup radconfirm">         
            <div class="rwDialogText">
                {1}        
            </div>                     
            <div class="confirm-buttons">
                <a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
                    <span class="rwOuterSpan"><span class="rwInnerSpan"><img src="../images/buttons/delete_room.png" alt="" /></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>
    </ConfirmTemplate>
</telerik:RadWindowManager>


Any ideas?

Thanks

Tamir
Tamir
Top achievements
Rank 1
 answered on 13 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?