Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
274 views
With Q3 2013 SP1(2013.3.1114) you may experience JavaScript errors thrown in Internet Explorer 9. This problem may be observed on a machine that does not have audio services started and no audio drivers installed (e.g., MS Windows 2008 Server with no audio device).

The problem lies within the HtmlAudioElement implementation in Internet Explorer – since the OS is unable to play any sound the canPlayType method of the HtmlAudioElement throws Not Implemented exception that breaks further executions of RadControls’ scripts.

We have already handled this problem and the fix will be available in the upcoming internal builds (since 2013.3.1210) and official release (Q1 2014). In case this issue is a showstopper for your current project and you cannot wait for the next official release and / or cannot use an internal build, you can use the following temporary workaround:

Place the following script in the <head> section of the page:
if(typeof(HTMLAudioElement) !== 'undefined' && HTMLAudioElement.prototype && HTMLAudioElement.prototype.canPlayType) {
    var org = HTMLAudioElement.prototype.canPlayType;
    HTMLAudioElement.prototype.canPlayType = function(typeString) {
        var result = "";
        try{
            result = org(typeString);
        }
        catch(e) { }
 
        return result;
    }
}

Marin Bratanov
Telerik team
 answered on 03 Sep 2014
1 answer
102 views
When trying to Login on this Forum coming from a "Reply" button, it gives me an error on the returnUrl Eg.

https://www.telerik.com/login/v2/telerik?ReturnUrl=http%3a%2f%2fwww.telerik.com%2fforums%2fradgrid-inside-radtooltip%3factionMode%3dreplyPost%26postId%3d28fe5a89-c1d4-4b17-b581-8813071c6e99

Marc
Kristina
Telerik team
 answered on 03 Sep 2014
3 answers
175 views
I have a field above my RadDatePicker that has validation requirements and when there is an error the DatePicker button is showing up over the error message. There is no z-index settings setup for any of the items on the page.

How would I go about fixing this issue for just the DatePicker button?

Thanks,
Galin
Telerik team
 answered on 03 Sep 2014
3 answers
158 views
In a vb.net 2010 web form application the user loads 'template letters' to a web interface, that they can modify letters sent out to various customers to generate various late pay notifications. The user basically selects the 'template letter' they want to generate for a specific customer, and hits the 'save' button. The web interface has the tabs for 'preview', 'html', and 'design' as the bottom of editor. These tabs are not part of any custom code, they must be part of a web interface that is inherited.The values for the editor are stored in a sql server 2012 database in a field called 'strTemplate' and the value is actually html. The problem is once the html value for 'strTemplate' is loaded for the user to edit, extra blank lines are loaded between different parts of the 'templates. Basically extra <br></br> tags are generated.When the user hits the save button, more <br></br> tags are generated between the various parts of the letter.I do not want these extra blank lines to be generated.I have gone into the html tab, removed the <br></br> tags and hit the save button. The extra tags are still generated. I have stepped through the code to find where the tags are generated and can not find it.Thus can you tell me what I can do to not have the extra <br></br> tags generated?The following is some of the code that is used when accessing the part of that gets to the web interface:
Imports System.Data
Imports System.Reflection
Imports System.Windows.Forms
Imports Telerik.Web.UI
Imports System.Web.Script.Services
Imports System.Web.Script.Serialization
Imports System.Web.Services
Partial Class edittemplates_default
    Inherits System.Web.UI.PageProtected _master As MasterPage#Region "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load"    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load        _master = CType(Page.Master, MasterPage)
        _master.PageTitle = "Edit Templates"
        If Not Page.IsPostBack Then
            If (edittemplates_default.SiteUserManager.SessionUser IsNot Nothing) Then
                LoadTemplates()
                LoadVariables()
            Else
                'pnlEditor.Enabled = False
                'pnlEditor.Visible = False           
            End If
        End If
        Master.Page.Title = "Login"
    End Sub
#End Region#Region "Protected Sub LoadTemplates()"
Ianko
Telerik team
 answered on 03 Sep 2014
3 answers
172 views
Hi there,

I am implementing a Radtooltipmanager in my scheduler page which is working with the web service. And I want to use the tooltipmanager on the client side, no need to do server side. However, I cannot fire the tooltipmanager javascript in my aspx page. Could anyone give me an idea ?
thank you

001.<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
002.    <link href="Styles/Tooltip.css" rel="stylesheet" type="text/css" />
003.</asp:Content>
004.<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
005.    <div id="content">
006.        <asp:HiddenField ID="hdfSelectedTab" runat="server" Value="0" EnableViewState="true" />
007.        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
008.            <Scripts>
009.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
010.                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
011.            </Scripts>
012.        </telerik:RadScriptManager>
013.        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
014.            <AjaxSettings>
015.                <telerik:AjaxSetting AjaxControlID="RadScheduler1">
016.                    <UpdatedControls>
017.                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
018.                    </UpdatedControls>
019.                </telerik:AjaxSetting>
020.            </AjaxSettings>
021.        </telerik:RadAjaxManager>
022.        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
023.        </telerik:RadAjaxLoadingPanel>
024.        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
025.            <script type="text/javascript">
026.                var hdfSelectedTab = $('#<%=hdfSelectedTab.ClientID%>');
027.            </script>
028. 
029.            <script type="text/javascript">
030.                //<![CDATA[
031.                var categoryNames = new Array();
032. 
033.                function OnClientAppointmentsPopulating(sender, eventArgs) {
034.                    addSelectedCategoriesToArray(categoryNames);
035.                    eventArgs.get_schedulerInfo().CategoryNames = categoryNames;
036.                    categoryNames = new Array(); //clear the array
037.                }
038. 
039.                function OnClientAppointmentWebServiceInserting(sender, args) {
040.                    //set a default Calendar resource
041.                    if (args.get_appointment().get_resources().get_count() == 0) {
042.                        var defaultCalendarResource = sender.get_resources().getResourceByTypeAndKey("Calendar", 1);
043.                        args.get_appointment().get_resources().add(defaultCalendarResource);
044.                    }
045.                }
046. 
047.                function rebindScheduler() {
048.                    var scheduler = $find('<%=RadScheduler1.ClientID %>');
049.                    scheduler.rebind();
050.                }
051. 
052.                //function onSchedulerDataBound(scheduler) {
053.                //    var $ = jQuery;
054.                //    $(".rsAptDelete").each(function () {
055.                //        var apt = scheduler.getAppointmentFromDomElement(this);
056.                //        // creating an object containing the data that should be applied on the template
057.                //        var tmplValue = { Description: apt.get_description() };
058.                //        // instantiate the template, populate it and insert before the delete handler (".rsAptDelete")
059.                //        $("#tmplAppDescription").tmpl(tmplValue).insertBefore(this);
060.                //    });
061.                //}
062. 
063.                function OnClientAppointmentDataBound(sender, eventArgs) {
064.                    var app = eventArgs.get_appointment();
065.                    var jobTitle = app.get_attributes().getAttribute("JobTitle");
066.                    //app.Description = jobTitle;
067. 
068.                    //if (backColor)
069.                    //    app.set_backColor(backColor);
070.                    app.set_borderColor("black");
071.                    app.set_borderWidth("1");
072. 
073.                }
074.                //]]>
075. 
076.                //<![CDATA[
077.                function hideActiveToolTip() {
078.                    var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
079.                    if (tooltip) {
080.                        tooltip.hide();
081.                    }
082.                }
083. 
084.                Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginRequestHandler);
085.                function beginRequestHandler(sender, args) {
086.                    if (args.get_postBackElement().id.indexOf('RadScheduler1') != -1) {
087.                        hideActiveToolTip();
088.                    }
089.                }
090. 
091.                function OnClientRequestStart(sender, args) {
092.                    alert('aa');
093.                    args.set_cancel(true);
094.                    var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
095.                    if (tooltip) {
096.                        var element = tooltip.get_targetControl();
097.                        var apt = $find("<%=RadScheduler1.ClientID %>").getAppointmentFromDomElement(element);
098.                        $get("startTime").innerHTML = apt.get_start().format("MM/dd/yyyy HH:mm");
099.                        $get("endTime").innerHTML = apt.get_end().format("MM/dd/yyyy HH:mm");
100.                        $get("descriptionDiv").innerHTML = apt.get_subject();
101.                        tooltip.set_text($get("contentContainer").innerHTML);
102.                         
103.                    }
104.                }
105. 
106.                function OnClientAppointmentContextMenu(sender, args) {
107.                    hideActiveToolTip();
108.                }
109.                //]]>
110.            </script>
111.        </telerik:RadCodeBlock>
112.        <div class="tab_content" id="defaultSchedule">
113.            <telerik:RadButton ID="btnExportSchedulePdf" runat="server" Text="Export to PDF" CssClass="pdfButton"
114.                ValidationGroup="ValidatePageSize">
115.                <Icon PrimaryIconUrl="images/pdf.gif"></Icon>
116.            </telerik:RadButton>
117.            <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1"
118.                CssClass="exampleContainer">
119.                <div style="padding: 10px;">
120.                    <telerik:RadComboBox runat="Server" ID="cmbStaff" Width="200px"
121.                        AutoPostBack="True">
122.                    </telerik:RadComboBox>
123.                </div>
124.                <telerik:RadScheduler runat="server" ID="RadScheduler1" SelectedView="MonthView" Height="100%" OnClientAppointmentContextMenu="OnClientAppointmentContextMenu"
125.                    TimeZoneOffset="03:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Friday" StartEditingInAdvancedForm="true" Skin="Office2010Silver"
126.                    EnableDescriptionField="true" OverflowBehavior="Auto" AppointmentStyleMode="Default" OnClientAppointmentDataBound="OnClientAppointmentDataBound" CustomAttributeNames="StaffID,JobStatusID,ClientID,Address,ContactNumber,Suburb,State,Postcode,StaffName,JobStatusName,ClientName,JobTitle"
127.                    ShowAllDayRow="False">
128.                    <AdvancedForm Modal="true"></AdvancedForm>
129.                    <TimelineView GroupBy="Calendar" GroupingDirection="Vertical"></TimelineView>
130.                    <WebServiceSettings Path="Schedule/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide">
131.                    </WebServiceSettings>
132.                    <TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
133.                    <AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
134.                </telerik:RadScheduler>
135.                <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Width="320" Height="170"
136.                    Animation="None" HideEvent="Default" Text="Loading..." OnClientRequestStart="OnClientRequestStart">
137.                </telerik:RadToolTipManager>
138.                <div style="display: none;">
139.                    <div id="contentContainer">
140.                        <div class="appointment-tooltip">
141.                            <p>
142.                                Starts on: <span id="startTime">
143.                                    <!-- -->
144.                                </span>
145.                                <br />
146.                                Ends on: <span id="endTime">
147.                                    <!-- -->
148.                                </span>
149.                            </p>
150.                            <hr />
151.                            Description:
152.                            <div id="descriptionDiv">
153.                            </div>
154.                        </div>
155.                    </div>
156.                </div>
157.            </telerik:RadAjaxPanel>
158.        </div>
159.    </div>
160.</asp:Content>
Plamen
Telerik team
 answered on 03 Sep 2014
3 answers
215 views
Hi,
I want to populate huge(Parent/Childs) data in RadDropDownTree from the database. But it's taking long time to load.
What i want to do..
I want populate first Parent Data then when user click on + then populate the child data
DataTable dtData = GetList();
RadTreeNode rootTreeNode = new RadTreeNode();
foreach (DataRow row in dtData.Rows)
{
    rootTreeNode = new RadTreeNode(row["name"].ToString(), row["ID"].ToString());    
    if (Convert.ToBoolean(row["HasChilds"]))
    {                  
       // HERE I WANT TO ADD SERVERSIDE EXPAND MODE                   
    }
   RadddTreeSubFile.EmbeddedTree.Nodes.Add(rootTreeNode );
}

Boyan Dimitrov
Telerik team
 answered on 02 Sep 2014
15 answers
778 views
Hello telerik,
I have requirement like this.....I have " rad grid " with  5 to 6 columns like  rad com-box ,and rad text box 's   apart from that i have "rad async upload" ,how to set required field (or) custom validator to to restrict the user to select some file or image ..how to validate whether
user is load the image or not .    can provide some snippet ..to validate "rad grid inside rad async upload control"


<telerik:RadGrid id="RadGrid1" runat="server">
<MasterTableView>
<Columns>
<telerik:RadAsyncUpload Id="RadAsyncUpload1" runat="server"/>
</Columns>
</MasteTableView>
<telerik:RadGrid>

how to validate the " rad async Upload " Control  through "required filed validator " or"custom validator" in rad grid Insert and Update.
Hristo Valyavicharski
Telerik team
 answered on 02 Sep 2014
0 answers
344 views
Dear All,

   I'm very new guy here. and I had two RadListBoxItems in my aspx page. ListUserCols and ListAllCols.  and while I'm loaded some of the values through DB in ListUserCols for manualy selected items. and then I loaded all of my 50 items in ListAllCols listbox.!

  Now, I need to check from Second Listbox items(ListUserCols) not exist in First Listbox items. Please help me to find out resolved that issue.. I'm searched google in many time. No results are found. Moreover, i didn't select any Items in listbox, all loaded from DB.

Sample code:

                     DataSet dsAttributes = new DataSet();
                      foreach (DataRow dr in dsAttributes.Tables[0].Rows)
                        {
                            lstUserColumns.Items.Add(new RadListBoxItem(dr["Column_Desc"].ToString()));
                        }

                      

                        foreach (RadListBoxItem selectedItem in lstUserColumns.Items)
                        {
                            //lstAllColumns.Items.Remove(new RadListBoxItem(selectedItem.Value));
                            RadListBoxItem item = lstAllColumns.FindItemByText(selectedItem.Text);
                            item.Remove();
                        }                       
                    }
AL MUBARAK
Top achievements
Rank 2
 asked on 02 Sep 2014
1 answer
188 views
Could you show me a sample for add,remove,change text with a RadTreeView and save to database?
I tried many ways but never work.
At first I face "id" problem,these create by JavaScript doesn't have Value to be "id".
Then I face "parentID" problem,because parentNode is create by JavaScript so it have no Value to become "parentID"
And many problems.

(I am trying to create a new tree,the database is empty)

Could you give me a sample for Client-Side add,remove,change text,and postback to save to Database?

Thanks!
Boyan Dimitrov
Telerik team
 answered on 02 Sep 2014
1 answer
184 views
Hello everyone,

first some tecnical details:

We use the Telerik Controls in Version 2014.2.708.45
Our problem occuring with IE 8, 9, 10 and 11.
We use .Net Framework 4.5

Our problem is the following one:

We have an ajaxified RadTabStrip connected to a RadMultiPage. We create the pages connected to the tabs dynamically as done in this demo. The page views contain a usercontrol. The usercontrols contains some RadTextBox controls. All Textboxes have a label, where the LabelWidth is set to 250px. The width property of the textbox is set to 100%.

The following is done by css:

html body .RadInput_MySkinName {
    display: table;
}
 
html body .RadInput_MySkinName .riTextBox,
html body .RadInputMgr_MySkinName {
  display: table-cell;
  border-color: #cdcdcd;
  background: white;
  color: black;
  font-weight: 100;
  font-size: 16px;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif; }

How it should look can be seen in the attached file SampleTelerikUserControl.png. This works fine in all browsers if the usercontrol is directly added to a page.

If the usercontrol is added dynamically in ajaxified TabStript/PageView the textbox controls have not the correct width (only in IE, in all other browsers the controls are properly rendered - the width ignores the 250px from the lable). If you click another tab (and and something is done through ajax) and than switch back to the first tab with the wrong rendered usercontrol the controls of the usercontrol are now properly displayed. The wrong behavior could be seen in ErrorTelerikUserControl.PNG, the correct behavoir is shown in OkTelerikUserControl.PNG (after the first ajax call).

Thanks
Magdalena
Telerik team
 answered on 02 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?