Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
105 views

Hey there, I'm trying to use a RadRotator to create functionality where whenever an image is clicked, an accompanying DIV is shown or hidden. This is a different DIV depending on the image which is clicked, and only one can be shown at a time. If the onclick javaScript event changes the style to 'block' I want the rotator to be paused, and only resume when the div is changed to 'none' style. This works fine for a couple seconds, however when I leave it for half a minute (to read the text in the div for example) and then click the image in the rotator it'll shoot over to another image (so the image will change on click) and the DIVs won't show or collapse. I am yet to find a pattern in the behaviour, but I feel like the rotator isn't fully paused but rather still going underwater - and we just can't see it.

I have added the code below, if you guys could tell me which function to use or what else to try that'd help immensely!

.aspx:

<div style="padding: 10px 10px 10px 10px;" id="ImageRotatorDiv">
    <telerik:RadRotator OnClientLoad="onRotatorLoadHandler" runat="server" ID="ImageCarouselRotator" Name="CarouselRotator" Width="1000" Height="550" CssClass="rotatorStyle" Style="cursor: default; margin: 0 auto;" ItemWidth="1000" ItemHeight="550" RotatorType="SlideShow" ScrollDirection="Right" FrameDuration="3000" SlideShowAnimation-Duration="500" SlideShowAnimation-Type="Fade" PauseOnMouseOver="False">

        <Items> //I add the images dynamically from a certain SiteFinity image folder
        </Items>
    </telerik:RadRotator>
</div>

//Example of one of the divs
<div class="hiddenDiv" id="DivShow1">
    <h1>Diginissim</h1>
    <p>In a mauris posuere, hendrerit nisi ut, rhoncus leo. Donec viverra mi ac ipsum placerat bibendum. Cras vel lacus nec augue laoreet maximus vel ac ex. Cras eu rhoncus dui, id iaculis risus. Aliquam consequat ex erat, sit amet consequat mi varius ac.</p>
    <p>Integer luctus nunc ut porttitor dignissim. Pellentesque efficitur, nibh in euismod mattis, enim urna efficitur massa, id venenatis dui dui at ex.</p>
</div>

 

JavaScript:

function showHide(id) {
        for (var divName in divNamesArray) {          //gets all the (currently hidden) divs on the page
            if (divNamesArray.hasOwnProperty(divName)) {
                var div = document.getElementById(divNamesArray[divName]);
                if (div === null || div === undefined) {         //check
                    continue;
                }
                if (divNamesArray[divName] === id) {       //each image gets the correct DIV name attached to it on load, this all works fine
                    if (div.style.display === 'none') {
                        div.style.display = 'block';
                        oRotator.pause();       //Wrong function?
                    } else {
                        div.style.display = 'none';
                        oRotator.resume();
                    }
                }
            }
        }
    }

 

I'm looking forward to hearing your ideas!

Vessy
Telerik team
 answered on 25 Feb 2016
1 answer
71 views

Hi Team,

 

I have a RadGrid with multiple template columns, In one column i have a link and textbox and on another I have a dropdown list.

I click on link, a popup opens select some value and set in the grid's text box, Since I need to bind the dropdown from text based on textbox value, I post back the using the Autopostback=true, But I am not able to bind the combobox, as I am not able to retain the values for textbox.

 

Can you help me on this.

 

Regards,

Sandeep

Eyup
Telerik team
 answered on 25 Feb 2016
2 answers
137 views

Hi,

              Can you please let me know how to add the tool tip for the RadWizard buttons Next/Previous/Finish buttons…etc?

Thanks,
BVS Rao.

Burepalli V S Rao
Top achievements
Rank 1
 answered on 24 Feb 2016
3 answers
281 views

I'm creating a user control that adds a new window to the RadWindowManager. I'm trying to add a header to the window, which seems easy enough in the demo code, but I'm getting an error that says "'header' is not a member of 'Telerik.Web.UI.RadWindow'.". I'm new to jquery and Ajax controls, so I don't know if I'm missing something.

(Telerik version is 2014.3.1024.45)

ascx file -

<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadWindowManager RenderMode="Auto" ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false" ReloadOnShow="True" runat="server" EnableShadow="true" EnableViewState="False">
  <Shortcuts>
    <telerik:WindowShortcut CommandName="RestoreAll" Shortcut="Alt+F3"></telerik:WindowShortcut>
    <telerik:WindowShortcut CommandName="Tile" Shortcut="Alt+F6"></telerik:WindowShortcut>
    <telerik:WindowShortcut CommandName="CloseAll" Shortcut="Esc"></telerik:WindowShortcut>
  </Shortcuts>
</telerik:RadWindowManager>

Code Behind -

Public Sub ShowModalDialog(ID As String, URL As String)
 
  Dim newWindow As New RadWindow()
  'NavigateUrl to be chosen dynamically.
  newWindow.ID = ID
  newWindow.NavigateUrl = URL
  newWindow.VisibleOnPageLoad = True
  newWindow.OnClientClose = "OnClientClose"
  newWindow.Modal = True
 
  newWindow.header = "Test"
 
 
  newWindow.Shortcuts.Add(NewWindowShortcut("Maximize", "Ctrl+F2"))
  newWindow.Shortcuts.Add(NewWindowShortcut("Restore", "Ctrl+F3"))
  newWindow.Shortcuts.Add(NewWindowShortcut("Minimize", "Ctrl+F8"))
 
  RegisterControl(ID)
  ModalWindow.Windows.Add(newWindow)
 
End Sub

 

 

 

 

 

Marin Bratanov
Telerik team
 answered on 24 Feb 2016
15 answers
786 views
Hi,

I am thinking about adding the AjaxManager to the master page instead of one manager for each page.

Is there any disadvantage of using a single RadAjaxManager performance wise? I have a common type for Masterpage so I don't have to use findcontrol.

In the help file,

6) RadAjaxManager and RadAjaxPanel at the same application

There are some known issues when using both the manager and the panel in some complex applications - MasterPage or WebUserControls. However, note that a single RadAjaxManager (and no panels) in the master/main page could handle all the scenarios.

What are the known issues? Since RadAjaxManager cannot ajaxify asp:panel anymore, it is not as easy to use as the RadAjaxPanel. I want to avoid any issues beforehand before I add a RadAjaxManager to my masterpage.

In addition, about RadCodeBlock:

What's the difference between using it and a regular asp:placeholder? If I enclose the <%=%> within a placeholder, it works as well. I need to know the advantage/disadvantage of using either performance wise. Since both are derived from UI.Control and don't have any additional functionalities... And since you don't have any info about it in the help file, I don't really see the point of having this extra control..
Maria Ilieva
Telerik team
 answered on 24 Feb 2016
1 answer
92 views

My customer wants to display different nested row controls, depending on the several clickable cells in a row. So if the user clicks on the cell in column 1, a dialog allowing to change some data should appear. If the user clicks on the cell in column 2, a different view presenting some child records shall be displayed, etc. etc.

Are NestedView templates the way to go here? Can I replace the template with every postback?

Also, there are views required that concern all rows. Would it be possible to show those before row 0?

Viktor Tachev
Telerik team
 answered on 24 Feb 2016
2 answers
136 views

Recently I have upgraded Telerik version(UI for ASP.NET AJAX) of our project to 2016 Q1. I am using RadSpell on a modal window to check spelling of a textbox on a toolbar button click. After checking for spellings, when I am clicking Close button of the parent modal window, a javascript error is occurring. 

Unable to get property 'mouseup' of undefined or null reference
URL: http://localhost/iTrakWebApp/ScriptResource.axd?d=9q9IkYzT1P6H219_x_k_x6tLRP323yXAyrwkg1Ad2IPRcVJmSr5AfeHLfQpTT0ru3iT17DNdmYKU5PFr8hBs5AsWwk8jA0vEMVJJ-56Xnq_NSUL51QzqhcizV-kFio5lZ5xjPw2&t=ffffffffcf2f22b2

Note that, this error was not occurring in 2015 Q3 version. Also I can't reproduce the issue if I remove the RadSpell control from the page.

For convenience, I am adding the lines of code related to RadSpell control. It would be of great help if someone can point out why this js error is occurring. Thanks in advance.

 

<Rad:RadSpell ID="SpellCheck" runat="server" ButtonType="None" OnClientDialogClosed="SpellCheckClosed" IsClientID="true" meta:resourcekey="SpellCheckResource1" />

......

// called this function on spell check button click

function StartCheck() {
    var sources = [new Telerik.Web.UI.Spell.HtmlElementTextSource($get('<%=tbxSynopsis.ClientID %>'))];
    var spell = $find('<%= SpellCheck.ClientID %>');
    spell.set_textSource(new Telerik.Web.UI.Spell.MultipleHtmlElementsSource(sources));
    spell.startSpellCheck();
}

Marin Bratanov
Telerik team
 answered on 24 Feb 2016
1 answer
88 views

Hi

I use gantt chart viewer in my company project.

it's realy perfect but i have some problem with custom provider

i want show a message in UI when something is wrong is customProvider
for example use delete a dependency but in deleteDependency function ,we understand use haven't dependency delete permittion and we throw a exception.

but in UI, dependency line is deleted.

we want show dependency line in UI if delete function return throw exception and show a message to user contain throw message.

Bozhidar
Telerik team
 answered on 24 Feb 2016
1 answer
924 views

Hi Telerik team

I have blow code and i delcare a javascript function in web page that contain a few jquery function . i wana to call it from code behind but when use it i get error .

please help me .

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!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>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <style type="text/css">
        #msg {
            width: 400px;
            height: 200px;
            background-color: fuchsia;
            color: blueviolet;
            font-size: 16px;
            display: none;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
 
        <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            (function ($) {
                $(document).ready(function () {
                    function showmsg() {
                        $("#msg").show(2000).delay(3000).hide(2000);
                    }
                });
            })($telerik.$);
        </script>
    </telerik:RadScriptBlock>
 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadButton1">
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadButton1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadButton1" UpdatePanelCssClass=""></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <div>
 
            <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClick="RadButton1_Click">
            </telerik:RadButton>
        </div>
        <div id="msg">
            Hi Telerik team...
        </div>
    </form>
     
</body>
</html>

protected void RadButton1_Click(object sender, EventArgs e)
   {
       System.Threading.Thread.Sleep(1000);
       ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "showmsg();", true);
 
   }
Eyup
Telerik team
 answered on 24 Feb 2016
1 answer
128 views

I am unable to set focus when a required field validator is fired for a RadEditor.

I also have this issue to solve for a RadDatePicker and RadTimePicker.

I found this http://www.telerik.com/forums/how-to-use-requiredfieldvalidator-to-setfocusonerror-with-radeditor but I have multiple RadEditors on the page only one o f which is a required field.

Marin Bratanov
Telerik team
 answered on 24 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?