Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
194 views
I have created a page where a panel item link opens a rad tab and rad multipage. The tab shows on the first click but the page is not loaded during the first click of the panel item.But if I close the tab and re click the link it works perfectly.Any ideas???Thanks in advance.

Here's the code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ 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 runat="server">
    <title></title>
    <style type="text/css">
        html, body, form
        {
            background: #fff;
            height: 100%;
            margin: 0;
            padding: 0;
            width: 100%;
            position: absolute;
        }
    </style>
 
    <script type="text/javascript">
        function ReLoadWindow(url, title, width, height) {
 
            var manager = GetRadWindowManager();
            var cWindow = manager.getActiveWindow();
            if (cWindow != null)
                cWindow.close();
 
            var oWindow = radopen(url, null);
            oWindow.SetSize(width, height);
            oWindow.MoveTo(195, 150);
            oWindow.set_title(title);
            oWindow.add_pageLoad(function () { oWindow.set_status("  "); });
        }        
    </script>
    <link href="Styles/Default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
        var tabStrip1;
 
        function OnClientLoad() {
            tabStrip1 = $find('<%= RadTabStrip1.ClientID %>');
 
            for (var i = 0; i < tabStrip1.get_tabs().get_count(); i++) {
                AttachCloseImage(tabStrip1.get_tabs().getItem(i), "Images/Icons/close.png");
                
            }
        }
        function addtab(url, text) {
            var tab = new Telerik.Web.UI.RadTab();
            tab.set_text(text + tabStrip1.get_tabs().get_count());
            tabStrip1.get_tabs().add(tab);
            tab.select();
            AttachCloseImage(tab, "Images/Icons/close.png");
 
            var multiPage = $find("<%=RadMultiPage1.ClientID %>");
 
            multiPage.trackChanges();
 
            var pageView = new Telerik.Web.UI.RadPageView();
            multiPage.get_pageViews().add(pageView);
            pageView.set_contentUrl(url);
            multiPage.commitChanges();
                         
//            pageView.get_element().innerHTML = "PageView1";
 
      
        }
 
        function CreateCloseImage(closeImageUrl) {
            var closeImage = document.createElement("img");
            closeImage.src = closeImageUrl;
            closeImage.alt = "Close this tab";
            return closeImage;
        }
 
        function AttachCloseImage(tab, closeImageUrl) {
            var closeImage = CreateCloseImage(closeImageUrl);
            closeImage.AssociatedTab = tab;
            closeImage.onclick = function (e) {
                if (!e) e = event;
                if (!e.target) e = e.srcElement;
 
                deleteTab(tab);
 
                e.cancelBubble = true;
                if (e.stopPropagation) {
                    e.stopPropagation();
                }
 
                return false;
            }
            tab.get_innerWrapElement().appendChild(closeImage);
        }
 
        function deleteTab(tab) {
            var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
 
            var tabToSelect = tab.get_nextTab();
            if (!tabToSelect)
                tabToSelect = tab.get_previousTab();
 
            tabStrip.get_tabs().remove(tab);
 
            if (tabToSelect)
                tabToSelect.set_selected(true);
        }
 
    </script>
<%-- <script type="text/javascript">
     function pageLoad() {
         var multiPage = $find("<%=RadMultiPage1.ClientID %>");
 
         multiPage.trackChanges();
 
         var pageView = new Telerik.Web.UI.RadPageView();
         multiPage.get_pageViews().add(pageView);
         pageView.get_element().innerHTML = "PageView1";
 
         multiPage.commitChanges();
     
</script>--%>
    <div class="page">
       <div class="header01">
            <div class="head_top">
                <div class="homeicon">
                    <asp:HyperLink runat="server" Target="_parent" NavigateUrl="~/Default.aspx">
                        <asp:Image ID="Homeicon" runat="server" BorderWidth="0px" ImageUrl="~/Images/home.png"/>
                    </asp:HyperLink>  
                </div>
                <div class="side01">
                    <label class="text02">XERP</label>
                </div>
                <div class="side02">
                    <telerik:RadMenu runat="server" Skin="">
                        <Items>
                            <telerik:RadMenuItem CssClass="dropdowntop">
                                <ItemTemplate>                                     
                                <div class="dropdownside01">
                                    <label class="text01">Hi! Rezwanul Huq</label>
                                    <label class="text01">Wed 15, Oct 2012 15:12</label>                  
                                </div>
                                <div class="dropdownside02">
                                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Icons/client.png"/>
                                </div>
                                </ItemTemplate>
                                <Items>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/message.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Inbox</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/chpassword.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Change Password</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/Settings.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Settings</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/help.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Help</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>
                                            <div class="DropdownIcon">
                                                <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Icons/Logout.png" CssClass="DropdownIconAlign" />                                       
                                            </div>                                   
                                            <div class="DropdownText">
                                               <asp:Label ID="Label1" runat="server" class="text03">Log Out</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                    <telerik:RadMenuItem CssClass="Dropdown">
                                        <ItemTemplate>                              
                                            <div class="DropdownText01">
                                               <asp:Label ID="Label1" runat="server" class="text03">Last Login Detail: <br /> Wed 15, Oct 2012 15:12</asp:Label>
                                            </div>
                                        </ItemTemplate>
                                    </telerik:RadMenuItem>
                                </Items>
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>
               </div>             
            </div>
       </div>
       <div class="bottom">
            <telerik:RadSplitter ID="RadSplitter1" Width="99.9%" Height="100%" runat="server"
                ResizeMode="EndPane">
                <telerik:RadPane ID="RadPane1" runat="server" Width="230px" CssClass="menu" Scrolling="Y">
                    <div style="height:4%; margin:3px 1px 0px 3px;">
                        <telerik:RadTextBox  EmptyMessage="Search Menu...." ID="searchbox" runat="server" Width="175px">
                             
                        </telerik:RadTextBox>
                        <telerik:RadButton ID="searchbtn" runat="server" Skin="" CssClass="SearchButton" >
                            <Icon PrimaryIconWidth="26px" PrimaryIconHeight="26px" PrimaryIconUrl="Images/Icons/search.png" />
                        </telerik:RadButton>
                    </div>
                    <telerik:RadPanelBar ID="RadPanelBarMenu" runat="server" ExpandMode="FullExpandedItem"
                       CssClass="radpanelbar" Width="233px" height="95.5%">
                        <Items>
                            <telerik:RadPanelItem runat="server" Expanded="true" Height="30px" Text="Business Settings" ImageUrl="~/Images/Icons/business_settings.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" Target="MainPane" Text="Company Setup" onclick="ReLoadWindow('UserHome.aspx','User Management',750,500)">
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" onclick="addtab('Test.aspx','Bank')" Text="Bank">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Height="30px" Text="Human Resource" ImageUrl="~/Images/Icons/HRM_icon.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/HRM/Employee.aspx"
                                        Target="MainPane" Text="Employee">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Height="30px" Text="Stock & Inventory" ImageUrl="~/Images/Icons/SI.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/SI/Items.aspx"
                                        Target="MainPane" Text="Items">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                            <telerik:RadPanelItem runat="server" Height="30px" Text="Security" ImageUrl="~/Images/Icons/security.png">
                                <Items>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/Security/SecurityUsers.aspx"
                                        Target="MainPane" Text="User">
                                    </telerik:RadPanelItem>
                                    <telerik:RadPanelItem runat="server" NavigateUrl="~/Account/ChangePassword.aspx"
                                        Target="MainPane" Text="Change Password">
                                    </telerik:RadPanelItem>
                                </Items>
                            </telerik:RadPanelItem>
                        </Items>
                    </telerik:RadPanelBar>
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadSplitBar1" runat="server" CollapseMode="Forward" />
               
                <telerik:RadPane runat="server" ID="MainPane" BackColor="#f1f5fb" Height="100%" >
                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server"  MultiPageID="RadMultiPage1"
                            SelectedIndex="0" onclientload="OnClientLoad" >
                            <Tabs>
                                <telerik:RadTab Text="Dashboard">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"  >
                            <telerik:RadPageView ID="RadPageView1" runat="server" Height="100%"  ContentUrl="UserHome.aspx">
                            </telerik:RadPageView>
                        </telerik:RadMultiPage>
                    <script type="text/javascript">
                        function pageLoad() {
 
                            var $ = $telerik.$;
                            var height = $(window).height();
 
                            var multiPage = $find("<%=RadMultiPage1.ClientID %>");
                            var totalHeight = height - 100;
                            multiPage.get_element().style.height = totalHeight + "px";
 
                        }
                    </script>
 
 
                </telerik:RadPane>
            </telerik:RadSplitter>
            <telerik:RadWindowManager Visible="true" ID="Singleton"  CssClass="body_bg" EnableAjaxSkinRendering="true" Behavior="Default" VisibleOnPageLoad="false" runat="server" >
                <Windows>
                 
                    <telerik:RadWindow VisibleOnPageLoad="false" CssClass="body_bg" OffsetElementID="MapPane" Modal="false" Left="0px" Top="20px" Width="450px" Height="500px" Behavior="default" NavigateUrl="Widgets/CreateUser.aspx"  runat="server" ID="CreateUser" >
                    </telerik:RadWindow>
                     
               </Windows>
            </telerik:RadWindowManager>
            </div>
 
 
    </div>
    </form>
</body>
</html>
Nencho
Telerik team
 answered on 28 Nov 2012
6 answers
110 views

Good afternoon--

The RadRotator is working well in a SlideShow / Two Custom Button setup, except at random times on mouseover, the slideshow seems to "hang" for longer than FrameDuration. At this point, the two custom buttons are unresponsive and the next slide does not advance for 5-6 seconds. The slideshow then resumes, and another "hang" will happen at another random time on mouseover.

Is there something I can change to prevent this behavior?

Code is provided below.

Thanks
-Justin

 

<div id="notifications">
    <telerik:RadRotator 
        ID="rtrNotifications" 
        runat="server" 
        RotatorType="SlideShow" Height="15" 
        FrameDuration="3000" 
        SlideShowAnimation-Type="Fade"
        SlideShowAnimation-Duration="2000"
        PauseOnMouseOver="true"
        Width="767"
        ItemWidth="767"
        ItemHeight="15"
          
        >
            <ItemTemplate>  
                        <a href='<%# _appRoot %>/secure/notifications/NotificationDetail.aspx?id=<%# Eval("ID").ToString() %>'>
                        <%# System.Web.HttpUtility.HtmlEncode(Eval("Heading").ToString()) %>  
                        </a>
  
    
                     </ItemTemplate
                     <ControlButtons />
                       
    </telerik:RadRotator>
  
</div>
<div id="notifyButtons">
<a href="#" class="rrButtonLeft" style="display:block" onclick="showNextItem(this, $find('<%= rtrNotifications.ClientID %>'), Telerik.Web.UI.RotatorScrollDirection.Left); return false;">
                        </a>
<a href="#" class="rrButtonRight" style="display:block" onclick="showNextItem(this, $find('<%= rtrNotifications.ClientID %>'), Telerik.Web.UI.RotatorScrollDirection.Right); return false;"
                        > </a>
</div>                        
  
  
<script type="text/javascript">
  
    function showNextItem(clickedButton, rotator, direction) {
  
        rotator.showNext(direction);
    }
</script>

 

 

Slav
Telerik team
 answered on 28 Nov 2012
6 answers
320 views
Hello,

I have dynamically generated RadDocks that are loading user controls (ascx).  Inside one Dock is a user control with a RadScheduler and in another Dock is a user control with a RadGrid.  I am unable to get the Scheduler or the Grid to expand to fit 100% in height and Width within the Dock when the page first renders.  If I make some sort of request in the control (such as changing the view in the Scheduler) or if I "Restore" the Browser itself, however; it automatically adjusts correctly.  I have tried setting the Scheduler and the Grid's Height and Width properties to 100%, as well as wrapping them in a DIV with the same properties set, yet they do not adjust on their own without intervention.

Here is an image of the initial behavior I am experiencing:


Thanks for the help.

Steve
Slav
Telerik team
 answered on 28 Nov 2012
3 answers
304 views

We have two websites, one running off the root as the parent website and the 2nd website running in a standard subdirectory as a child application.  For other technical reasons, we have to run the child application in a standard subdirectory and not as a virtual or application directory.  We are using the probing statement to reference the childapp bin directory

  <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <probing privatePath="bin;Childapp\bin"/>

    </assemblyBinding>

  </runtime>

 

To test this problem out I wrote two small “hello world” applications.  The parent  application is using version 2012.3.1016.40 and the child application is running 2012.1.411.40.  I only have the telerik.web.ui.dll and telerik.web.ui.skin.dll assemblies referenced and have tried setting the “specific version” property on the respective assemblies.

Below is the parent webpage

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GACWebTest1.Default" %>

 

<%@ Register Assembly="Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik3" %>

 

<!DOCTYPE html>

 

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

<head runat="server">

    <title></title>

</head>

<body>

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

    <div>

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

 

      <telerik3:RadButton ID="RadButton1" runat="server" Text="RadButton1" OnClick="RadButton1_Click" EnableEmbeddedSkins="true" Skin="Forest" ></telerik3:RadButton>

    </div>

    </form>

</body>

</html>

 

Below is the child webpage

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GACWebChild1.Default" %>

 

<%@ Register Assembly="Telerik.Web.UI, Version=2012.1.411.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik1" %>

 

<!DOCTYPE html>

 

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

<head runat="server">

    <title></title>

</head>

<body>

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

    <div>

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

        <telerik1:radbutton runat="server" text="RadButton"  OnClick="RadButton1_Click" Skin="Hay" ></telerik1:radbutton>

    </div>

    </form>

</body>

</html>

<%--  --%>

 

When viewing the first website (parent or child), the page renders perfectly.  When going to the other website, it generates the following error.

 

Telerik.Web.UI.RadButton with ID='RadButton1' was unable to find an embedded skin with the name 'Forest'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

 

Is there a way to explicitly tell what skin assembly to use?  Is there a way to handle this situation?

Slav
Telerik team
 answered on 28 Nov 2012
3 answers
478 views
hello.. i am using RadAsyncUpload to upload my client files i want 2 check if the current uploaded file size is larger then the maximum allowed file size i want 2 display my validation label without making that file appear in the progress area like appearing in the second image
Plamen
Telerik team
 answered on 28 Nov 2012
4 answers
225 views
Hello, When RadListBox is empty HeaderTemplate is vertically aligned to center by default and I was not able to find a way to place it at the top of the RadListBox. Once the list box is populated it goes to the top...

How can I make the HeaderTemplate align to top and why is it center aligned vertically by default?

Thanks.


Nencho
Telerik team
 answered on 28 Nov 2012
3 answers
262 views
Hi, 

I am using Asyncfileupload, and it work perfect but i have a case where the asyncfileupload fail to store the images after initiating postback. below is the scenario

1- fill the form
2- browse the images,... images are uploading
3- wait for one minute then click submit to save the images, save the form data

result:
1- the form has been saved successfully
2- images never saved, it is like you didnt upload any images at all



Genady Sergeev
Telerik team
 answered on 28 Nov 2012
3 answers
172 views
Is it possible to select multiple cells in a table and have "set cell properties" affect all of them? If I select multiple cells and change formatting (e.g., bold) the change takes effect across all selected cells; but if I right click and choose "set cell properties" it seems to only affect the cell under the mouse pointer.
Rumen
Telerik team
 answered on 28 Nov 2012
1 answer
83 views
Hi guys,

Our current set-up on our homepage is a RadTabStrip with a multipage for the tabs. The control is ajaxified and the Multipages are loaded on demand using the following approach: http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/loadondemand/defaultcs.aspx.

I was curious as to whether you guys have found a solution that will allow me to select a specified tab (via a query string or other input) programmatically. At the point of pageLoad i have no multipages in the collection other than the initially selected tab, so I'm assuming the selection will need to be made on the client side.

Let me know if there's any further info i can provide.

Many thanks in advance!
Jack
James
Top achievements
Rank 1
 answered on 28 Nov 2012
1 answer
125 views
Please i want to SHOW the delete button radscheduler appointment, or put any image in this place.
The code works perfectly, when i clicked this position. But i don't know why do not showing this button??

My code:

<telerik:RadScheduler ID="RadScheduler1" runat="server"
                  Skin="WebBlue" ShowViewTabs="False"
                    onformcreated="RadScheduler1_FormCreated"
                    onappointmentcommand="RadScheduler1_AppointmentCommand"
                    onappointmentcreated="RadScheduler1_AppointmentCreated"
                    onappointmentdelete="RadScheduler1_AppointmentDelete" ShowHoursColumn="False"
                    >
                    <MonthView VisibleAppointmentsPerDay="30" AdaptiveRowHeight="true" />
                    <AppointmentTemplate>
                        <div>
                            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                        </div>
                    </AppointmentTemplate>                   
                  <InlineInsertTemplate>                      
                <div>
                </div>
                    <table>
                    <tr>
                        <td>
                            <telerik:RadComboBox ID="RadComboBox1" runat="server">
                            </telerik:RadComboBox
                            <asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="Agregar"></asp:LinkButton>
                        </td>
                    </tr>
                    </table>
                     
                  </InlineInsertTemplate>                 
                </telerik:RadScheduler>

Thank you
Plamen
Telerik team
 answered on 28 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?