Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
155 views

Hello,

About generated combined style sheet file. 
I expected that my custom styles will be load after a telerik built in styles. but there is it first. 
How do I load it after build in styles?


<
telerik:RadStyleSheetManager runat="server" ID="RadStyleMn" >
    <CdnSettings TelerikCdn="Disabled" />
    <StyleSheets>
        <telerik:StyleSheetReference Path="~/Skins/CustomRadTreeVew.Web20.css"  />
    </StyleSheets>
</telerik:RadStyleSheetManager>


Simon
Telerik team
 answered on 19 Dec 2011
9 answers
154 views
Is there a way to set AllowDrop and AllowDrag for load on demand nodes?  I dont see those two properties in RadTreeNodeData.
macy
Top achievements
Rank 1
 answered on 19 Dec 2011
5 answers
147 views
I need the ability to style each footer item with specific criteria from the parent node. The attached screen shot is partially what I need, but instead of having the root node be formatted on every total line, I need each aggregate to be formatted with that parent's name. Is this possible?
Derek
Top achievements
Rank 1
 answered on 19 Dec 2011
3 answers
214 views
I have a TreeList with an Edit Form Template. How do I go about finding those controls when the edit form is opened? With the RadGrid I could find these controls by using the ItemDataBound event and checking if the item is in edit mode. Is there a similar way to do this with the TreeList control?

Thanks.
William
Top achievements
Rank 1
 answered on 19 Dec 2011
1 answer
158 views
Hi
I have a problem with scriptmanager .I have a RadButton and a ScriptManager in asp page when i run my program i receive this error:

Control 'RadScriptManager1' of type 'RadScriptManager' must be placed inside a form tag with runat=server.

i use asp.net ajax version 2011 and my html code  is here




<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ Page language="C#" %>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>سیستم جامع</title>
<link title="Khamenei.ir Search" href="http://farsi.khamenei.ir/opensearch.xml" type="application/opensearchdescription+xml" rel="search" />


<link href="http://farsi.khamenei.ir/favicon.ico" rel="shortcut icon" />
<meta content="Persian, FA" name="Language" id="Language" />
<link rel="stylesheet" type="text/css" href="styles.css" />
<link rel="stylesheet" type="text/css" href="menu.css" />
<link rel="stylesheet" type="text/css" href="search.css" />
<link rel="stylesheet" type="text/css" href="../StyleStandars/SS.css" />
</head>
<body class="HomeBody">
      


        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
 </telerik:RadScriptManager>  


    


<div style="width: 100%;background: url(themes/fa_def/images/ver2/ramadan_side_bg.gif) repeat-x center -26px" align="center">
<div style="width:977px;background: url(themes/fa_def/images/ver2/bg_side_body.gif) repeat-y;">
<div class="menu" align="right"><ul id="ldd_menu" class="ldd_menu">
<li>
              
                <asp:Label runat="server"> 
    </asp:Label>
<span class="ss"> سیستم خدمات شهری</span><!-- Increases to 510px in width-->
<div class="ldd_submenu">
                    <div style="width:90%;margin:0 auto;height:40px;background-image:url(back.jpg);display:none"><div style="margin-top:10px;color:White;padding:5px"></div></div>
<div class="loginContainer">
                         <p  class="logneHeader" style="text-align:center;" >ورود به سامانه خدمات شهری  </p>
                          <table>
                        
                          <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;" >
                          <td>نام کاربری</td>
                          <td>
                       
                              <telerik:RadTextBox ID="txtUserName"  CssClass="btn" runat="server">
                              </telerik:RadTextBox>
                              </td>
                          </tr>
                          <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;">
                          <td>
                          کلمه عبور
                          </td>
                          
                          <td>
                              <telerik:RadTextBox ID="RadTextBox2"  runat="server">
                              </telerik:RadTextBox></td>
                          </tr>
                             <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;">
                          <td>
                           سال کاری
                          </td>
                          
                          <td>
                              <telerik:RadComboBox ID="cmbWorkingYear" Width="130px"  runat="server">
                              </telerik:RadComboBox>
                             </td>
                          </tr>
                          <tr style="height:40px; vertical-align:bottom">
                          <td dir="rtl">
                              <telerik:RadButton ID="btnLogin" CssClass="btn" runat="server" Height="24px"  Text="ورود به سیستم">
                              <Icon PrimaryIconWidth="24px"  PrimaryIconHeight="24px" PrimaryIconTop="3px" PrimaryIconLeft="3px"
                         PrimaryIconUrl="../StyleStandars/Images/users_into.png" />
                                 
                              </telerik:RadButton>
                          </td>
                          <td></td>
                          </tr>
                          
                          </table>  
                        </div>
</div>
</li>
<li>
<span class="ss">سیستم سازمان پارکها وفضای سبز</span>
<div class="ldd_submenu">
                    <div style="width:90%;margin:0 auto;height:40px;background-image:url(back.jpg);display:none"><div style="margin-top:10px;color:White;padding:5px">سیستم جامع خیلی خوب ! نظر تو چیه؟</div></div>
<div class="loginContainer">
                         <p  class="logneHeader">ورود به سیستم : </p>
                          <table>
                        
                          <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;" >
                          <td>نام کاربری</td>
                          <td>
                              <telerik:RadTextBox ID="RadTextBox1"  CssClass="btn" runat="server">
                              </telerik:RadTextBox></td>
                          </tr>
                          <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;">
                          <td>
                          کلمه عبور
                          </td>
                          
                          <td>
                              <telerik:RadTextBox ID="RadTextBox3"  runat="server">
                              </telerik:RadTextBox></td>
                          </tr>
                             <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;">
                          <td>
                           سال کاری
                          </td>
                          
                          <td>
                              <telerik:RadComboBox ID="RadComboBox1"  runat="server">
                              </telerik:RadComboBox>
                             </td>
                          </tr>
                          <tr style="height:40px; vertical-align:bottom">
                          <td>
                              <telerik:RadButton ID="RadButton2" runat="server"  Text="ورود به سیستم">
                              </telerik:RadButton>
                          </td>
                          <td></td>
                          </tr>
                          
                          </table>  
                        </div>
</div>
</li>
<li>
<span class="ss">سیستم  ارزشیابی پیمانکاران</span>

<div class="ldd_submenu">
                    <div style="width:90%;margin:0 auto;height:40px;background-image:url(back.jpg);display:none"><div style="margin-top:10px;color:White;padding:5px">سیستم جامع خیلی خوب ! نظر تو چیه؟</div></div>
<div class="loginContainer">
                         <p  class="logneHeader">ورود به سامانه خدمات شهری : </p>
                          <table>
                        
                          <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;" >
                          <td>نام کاربری</td>
                          <td>
                              <telerik:RadTextBox ID="RadTextBox4"  CssClass="btn" runat="server">
                              </telerik:RadTextBox></td>
                          </tr>
                          <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;">
                          <td>
                          کلمه عبور
                          </td>
                          
                          <td>
                              <telerik:RadTextBox ID="RadTextBox5"  runat="server">
                              </telerik:RadTextBox></td>
                          </tr>
                             <tr style="height:30px; vertical-align:middle; font:tahoma; font-size:9pt; font-weight:bold; font-style:normal; color:White;">
                          <td>
                           سال کاری
                          </td>
                          
                          <td>
                              <telerik:RadComboBox ID="RadComboBox2"  runat="server">
                              </telerik:RadComboBox>
                             </td>
                          </tr>
                          <tr style="height:40px; vertical-align:bottom">
                          <td>
                              <telerik:RadButton ID="RadButton3" runat="server"  Text="ورود به سیستم">
                              </telerik:RadButton>
                          </td>
                          <td></td>
                          </tr>
                          
                          </table>  
                        </div>
</div>
</li>
             
               
</ul></div>
<div class="headerBgColor" align="right">
    <form id="ui_element" runat="server">
                    <p>
                       
</p>

                </form>






</div>
</div>
</div>
<div style="width: 100%;background: url(themes/fa_def/images/ver2/ramadan_side_bg.gif) repeat-x center -115px" align="center">
<div style="width:977px;background: url(themes/fa_def/images/ver2/bg_side_body.gif) repeat-y;line-height:13px">






<div style="height:260px;width:957px;"  class="bgColor" ></div>






</div>










</div>
<div style="width: 100%;background: url(themes/fa_def/images/ver2/ramadan_side_bg.gif) repeat-x center -373px" align="center">
<div style="width:977px;background: url(themes/fa_def/images/ver2/bg_side_body.gif) repeat-y;position:relative">




<div class="bgColor" style="width:957px;overflow: hidden;padding-top:4px" align="right">


</div>










</div>
</div>
<div style="width: 100%;" align="center">
<div style="width:977px;background: url(themes/fa_def/images/ver2/bg_side_body.gif) repeat-y;position:relative">
<div style="width:957px;padding-top:10px;overflow: hidden;" class="bgColor" align="right">
</div>








</div>
</div>
<div style="width: 100%;" align="center">
<div style="width:977px;background: url(themes/fa_def/images/ver2/bg_side_body.gif) repeat-y;line-height:13px">
<div class="bgColor" style="width:957px;height:159px;overflow: hidden" align="right">
</div>






</div>
</div>
<div style="width: 100%;margin-top:0px;height:10px;font-size:0px;" align="center">
<div style="width:977px;height:10px;background: url(themes/fa_def/images/ver2/trans_ui.gif) no-repeat 0px -70px;"></div>
</div>
<div style="width: 100%;margin-top:0px" align="center">
<div style="width:957px;overflow: hidden;text-align:center" align="right">
<div class="footer">


</div>
</div>
</div>
<div style="width:960px; margin:27px auto 4px auto; height:26px;">
<div class="footerLogo18x">


</div>
</div>
<div style="width: 100%;margin-top:0px" align="center">
<div style="width:957px;overflow: hidden;" align="right">
<div class="footerCopyright">    


تمامی حقوق این برنامه متعلق به شرکت اریکا می باشد
</div>
</div>
</div>




<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script type="text/javascript">
            $(function () {
                /**
                * the menu
                */
                var $menu = $('#ldd_menu');


                /**
                * for each list element,
                * we show the submenu when hovering and
                * expand the span element (title) to 510px
                */
                $menu.children('li').each(function () {
                    var $this = $(this);
                    var $span = $this.children('span');
                    $span.data('width', $span.width());


                    $this.bind('mouseenter', function () {
                        $menu.find('.ldd_submenu').stop(true, true).hide();
                        $span.stop().animate({ 'width': '410px' }, 300, function () {
                            $this.find('.ldd_submenu').slideDown(300);
                        });
                    }).bind('mouseleave', function () {
                        $this.find('.ldd_submenu').stop(true, true).hide();
                        $span.stop().animate({ 'width': $span.data('width') + 'px' }, 300);
                    });
                });
            });
        </script>
        <script type="text/javascript">
            $(function () {
                /**
                * the element
                */
                var $ui = $('#ui_element');


                /**
                * on focus and on click display the dropdown, 
                * and change the arrow image
                */
                $ui.find('.sb_input').bind('focus click', function () {
                    $ui.find('.sb_down')
  .addClass('sb_up')
  .removeClass('sb_down')
  .andSelf()
  .find('.sb_dropdown')
  .show();
                });


                /**
                * on mouse leave hide the dropdown, 
                * and change the arrow image
                */
                $ui.bind('mouseleave', function () {
                    $ui.find('.sb_up')
  .addClass('sb_down')
  .removeClass('sb_up')
  .andSelf()
  .find('.sb_dropdown')
  .hide();
                });


                /**
                * selecting all checkboxes
                */


                $ui.find('.sb_dropdown').find('label[for="all"]').prev().bind('click', function () {
                    $(this).parent().siblings().find(':checkbox').attr('checked', this.checked).attr('disabled', this.checked);
                });
            });
        </script>
</body></html>
please help to me.
thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Dec 2011
3 answers
152 views
Hi all,

I have a RadTreeView in my app and I need to change a specific node text. I am trying the following: (RadTreeView name: CriteriaTree)

((RadTreeNode)CriteriaTree.FindNodeByValue("20")).Text = "Node Text";

But it's not working.

Any thoughts?

Thanks,
Bruno
Bozhidar
Telerik team
 answered on 19 Dec 2011
5 answers
125 views
Please can you tell me if it is possible to expand a treenode node with single click using populate on demand server side.

Thank you very much

Richard
Plamen
Telerik team
 answered on 19 Dec 2011
1 answer
118 views
Dear Support,
I have a radgrid,which displays 90,000 records , every page has 50 rows.
Since all this records are loading to grid,while I open the page, loading takes a lot of time.
Could you please guide me, how can I fill data page by page.
Which means At first, grid fills only first page, while clicking on Page 2, page 2 data will load. So that loading time can be reduced.
Any help will be highly appreciated.
Thanks,
Sijo JOSEPH
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Dec 2011
1 answer
81 views
HI,
  I am using Telerik controls for Asp.Net Version Q3 2011 released1.I tried the Rad Skin Manager amd was trying to change the default skin. Unfortunately there was only the default skin. All the other skins are missing. This is happening to me for all the controls. Can any one help me in displaying all the available skins for the telerik controls under the Skin Property?
Mira
Telerik team
 answered on 19 Dec 2011
1 answer
151 views

Hi, 

I've used radrotator to display some products. Below is the code sample, there are current two problems I'm facing (as listed below)

I'm showing the product description when either user selects the radrotatoritem or when user clicks on the ControlButtons.

1)If I toggle between either of this option I get an error (error screenshot attached)
2)If I toggle between either of this option the product description is shown incorrectly for  a product which i've not selected at all. This happens when i toggle between the ControlButtons and clicking on the products themselves.
3) Sometimes I get this error like the below one

A]System.Collections.Generic.List`1[SelectProducts+fileInfo] cannot be cast to [B]System.Collections.Generic.List`1[SelectProducts+fileInfo]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.

Could you please help me resolve these issues? Thanks

private List<fileInfo> imagesArray

 

{

     //Error #3 is thrown here.

get { return (List<fileInfo>)ViewState["imagesArray"]; }

  set { ViewState["imagesArray"] = value; }

 

}

 

<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="SelectProducts.aspx.cs"
 
  
 
    Inherits="SelectProducts" %>
 
  
 
   
 
  
 
<%@ 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>
 
  
 
    <telerik:RadScriptBlock ID="as" runat="server">
 
  
 
   
 
  
 
        <script type="text/javascript">
 
  
 
   
 
  
 
            function OnClientItemClicked(sender, args) {
 
  
 
   
 
  
 
                sender.set_currentItemIndex(args.get_item().get_index(), true);
 
  
 
   
 
  
 
                var objArgs = sender.get_currentItem().get_index();
 
  
 
   
 
  
 
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(objArgs);
 
  
 
                  
 
  
 
            }
 
  
 
   
 
  
 
            function OnClientButtonClick(sender, args) {
 
  
 
   
 
  
 
    
 
  
 
                var objArgs = sender.get_currentItem().get_index();
 
  
 
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(objArgs);
 
  
 
            
 
  
 
            }
 
  
 
            function ShowDescription(sender, args) {
 
  
 
            }
 
  
 
        </script>
 
  
 
   
 
  
 
    </telerik:RadScriptBlock>
 
  
 
    <title>Vitti Login</title>
 
  
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
  
 
    <link rel="shortcut icon" type="image/ico" href="Themes/Default/Images/Icons/icon_fav.ico" />
 
  
 
    <link id="Link1" rel="stylesheet" type="text/css" runat="server" href="Themes/Default/Stylesheet/base.css"
 
  
 
        media="all" />
 
  
 
    <style type="text/css">
 
  
 
        .rotatorBackground
 
  
 
        {
 
  
 
            margin: 0 auto;
 
  
 
            width: 800px;
 
  
 
            height: 400px;
 
  
 
            -moz-border-radius: 15px;
 
  
 
            -webkit-border-radius: 15px;
 
  
 
             
 
  
 
        }
 
  
 
            .rotNoButtonsBack
 
  
 
        {
 
  
 
            width: 810px;
 
  
 
               
 
  
 
              background:url(../Images/Backgrounds/bg_Products.jpg);
 
  
 
         background-repeat: no-repeat;
 
  
 
        }
 
  
 
   
 
  
 
        .rotatorStyle
 
  
 
        {
 
  
 
            margin: 40px auto 0px;
 
  
 
        }
 
  
 
        .rotatorStyle .RotatorItem
 
  
 
        {
 
  
 
            margin: 5px;
 
  
 
            height: 100px;
 
  
 
            width: 100px;
 
  
 
        }
 
  
 
        .rotatorCarouselStyle
 
  
 
        {
 
  
 
            margin: 0px auto;
 
  
 
        }
 
  
 
        .RotatorItem
 
  
 
        {
 
  
 
            border: solid 0px #666666 !important;
 
  
 
        }
 
  
 
        .mainDiv
 
  
 
        {
 
  
 
            margin-bottom: 20px;
 
  
 
        }
 
  
 
        .configurationPanel
 
  
 
        {
 
  
 
            width: 290px;
 
  
 
            border: 0px;
 
  
 
        }
 
  
 
    </style>
 
  
 
</head>
 
  
 
<body>
 
  
 
    <form id="form1" runat="server">
 
  
 
    <asp:ScriptManager ID="ScriptManager1" runat="server" AsyncPostBackTimeout="300">
 
  
 
    </asp:ScriptManager>
 
  
 
    <telerik:RadWindowManager Skin="Default" ID="RadWindowManager2" ShowContentDuringLoad="false"
 
  
 
        Modal="true" IconUrl="" VisibleStatusbar="false" ReloadOnShow="true" Behavior="Move,Close"
 
  
 
        DestroyOnClose="true" runat="server" Width="310">
 
  
 
    </telerik:RadWindowManager>
 
  
 
    <telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
 
  
 
        runat="server" DefaultLoadingPanelID="LoadingPanel1">
 
  
 
        <AjaxSettings>
 
  
 
            <telerik:AjaxSetting AjaxControlID="radRotProducts">
 
  
 
                <UpdatedControls>
 
  
 
               
 
  
 
                    <telerik:AjaxUpdatedControl ControlID="detailsPanel" />
 
  
 
                </UpdatedControls>
 
  
 
            </telerik:AjaxSetting>
 
  
 
            <telerik:AjaxSetting AjaxControlID="chkRotationType">
 
  
 
                <UpdatedControls>
 
  
 
                    <telerik:AjaxUpdatedControl ControlID="radRotProducts" />
 
  
 
                </UpdatedControls>
 
  
 
            </telerik:AjaxSetting>
 
  
 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
 
  
 
                <UpdatedControls>
 
  
 
                    <telerik:AjaxUpdatedControl ControlID="detailsPanel" />
 
  
 
                </UpdatedControls>
 
  
 
            </telerik:AjaxSetting>
 
  
 
        </AjaxSettings>
 
  
 
    </telerik:RadAjaxManager>
 
  
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30"
 
  
 
        EnableSkinTransparency="false" BackColor="#E0E0E0">
 
  
 
    </telerik:RadAjaxLoadingPanel>
 
  
 
    <div id="container">
 
  
 
        <!-- banner starts -->
 
  
 
        <div style="float: right; height: 30px; padding-right: 5px">
 
  
 
            <telerik:RadMenu Visible="false" ID="RadMenu2" runat="server" EnableRoundedCorners="true"
 
  
 
                EnableShadows="true" Skin="Windows7">
 
  
 
                <Items>
 
  
 
                    <telerik:RadMenuItem Text="About Us" AccessKey="A" Value="1">
 
  
 
                    </telerik:RadMenuItem>
 
  
 
                    <telerik:RadMenuItem IsSeparator="True" Visible="true" />
 
  
 
                    <telerik:RadMenuItem Text="Contact Us" AccessKey="C" Value="132">
 
  
 
                    </telerik:RadMenuItem>
 
  
 
                </Items>
 
  
 
            </telerik:RadMenu>
 
  
 
        </div>
 
  
 
        <div id="header_home">
 
  
 
            <div id="logo">
 
  
 
            </div>
 
  
 
            <div id="app_title" style="visibility: hidden">
 
  
 
            </div>
 
  
 
            <div id="client_logo">
 
  
 
                <asp:Image ID="imgCompanyLogo" runat="server" Height="36px" />
 
  
 
            </div>
 
  
 
        </div>
 
  
 
        <div style="clear: both">
 
  
 
        </div>
 
  
 
        <!-- banner ends -->
 
  
 
        <!-- menu starts -->
 
  
 
        <div>
 
  
 
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
 
  
 
                <tr>
 
  
 
                    <td id="menubar_left">
 
  
 
                    </td>
 
  
 
                    <td id="menubar_middle">
 
  
 
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
 
  
 
                            <tr>
 
  
 
                                <td style="padding-top: 1px" align="right">
 
  
 
                                    <asp:CheckBox AutoPostBack="true" ID="chkRotationType" Text="Automatic" runat="server"
 
  
 
                                        Checked="true" OnCheckedChanged="chkRotationType_CheckedChanged" />
 
  
 
                                </td>
 
  
 
                            </tr>
 
  
 
                        </table>
 
  
 
                    </td>
 
  
 
                    <td id="menubar_right">
 
  
 
                    </td>
 
  
 
                </tr>
 
  
 
            </table>
 
  
 
        </div>
 
  
 
        <!-- menu ends -->
 
  
 
        <!-- body starts -->
 
  
 
        <div>
 
  
 
            <table cellpadding="0" cellspacing="0" border="0" width="100%">
 
  
 
                <tr>
 
  
 
                    <td id="bg_background_left">
 
  
 
                    </td>
 
  
 
                    <td id="bg_background_middle">
 
  
 
                        <div>
 
  
 
                            <telerik:RadAjaxPanel ID="AjaxPanel1" CssClass="rotNoButtonsBack" runat="server" LoadingPanelID="LoadingPanel1">
 
  
 
                                <div class="mainDiv">
 
  
 
                                    <div class="rotatorBackground">
 
  
 
                                        <%-- ItemWidth and ItemHeight include 2x5(pixels) margin and 1x2(pixels) border --%>
 
  
 
                                        <telerik:RadRotator ID="radRotProducts" RotatorType="CarouselButtons" runat="server"
 
  
 
                                            OnClientItemClicking ="OnClientItemClicked" EnableRandomOrder="true" PauseOnMouseOver="false"
 
  
 
                                            Width="800px" Height="400px" CssClass="rotatorCarouselStyle" ItemHeight="200"
 
  
 
                                            FrameDuration="2000" ItemWidth="300" ScrollDuration="500">
 
  
 
                                            <ItemTemplate>
 
  
 
                                                <asp:Image runat="server" ID="imgProduct" ImageUrl='<%#DataBinder.Eval(Container.DataItem,"Image")%>'
 
  
 
                                                    CssClass="RotatorItem" />
 
  
 
                                            </ItemTemplate>
 
  
 
                                           
 
  
 
                                            <ControlButtons  OnClientButtonClick ="OnClientButtonClick" />
 
  
 
                                        </telerik:RadRotator>
 
  
 
   
 
  
 
                                    </div>
 
  
 
                                </div>
 
  
 
                            </telerik:RadAjaxPanel>
 
  
 
                            <table border="0" cellpadding="3" cellspacing="2" width="750px" align="center" style="background-color: #f9f9f9;
 
  
 
                                border: 1px #f1f1f1 solid;">
 
  
 
                                <tr>
 
  
 
                                    <td class="infoPane">
 
  
 
                                        <div class="infoPaneBg" runat="server" id="detailsPanel">
 
  
 
                                            <div class="imageDetailsHeader">
 
  
 
                                                Image details:</div>
 
  
 
                                            <div id="viewPanel">
 
  
 
                                                <div class="details">
 
  
 
                                                    <strong>Name:</strong>
 
  
 
                                                    <asp:Label ID="labelImageName" runat="server"></asp:Label></div>
 
  
 
                                                <div class="details">
 
  
 
                                                    <strong>Keywords:</strong>
 
  
 
                                                    <asp:Label ID="labelImageKeywords" runat="server"></asp:Label></div>
 
  
 
                                                <div class="details">
 
  
 
                                                    <strong>Comments:</strong>
 
  
 
                                                    <asp:Label ID="labelImageComments" runat="server"></asp:Label></div>
 
  
 
                                            </div>
 
  
 
                                        </div>
 
  
 
                                    </td>
 
  
 
                                </tr>
 
  
 
                            </table>
 
  
 
                            <br />
 
  
 
                        </div>
 
  
 
                    </td>
 
  
 
                    <td id="bg_background_right">
 
  
 
                    </td>
 
  
 
                </tr>
 
  
 
            </table>
 
  
 
        </div>
 
  
 
        <!-- body ends -->
 
  
 
        <!-- footer starts -->
 
  
 
        <div id="footer">
 
  
 
            <div style="float: right; padding-top: 3px; padding-right: 10px">
 
  
 
                <a href="http://www.xyz.com" title="xyzxyzHome">
 
  
 
                    <img src="Themes/Default/Images/Logos/logo_xyz.png" alt="xyz" border="0" /></a>
 
  
 
            </div>
 
  
 
            <div id="sub-footer">
 
  
 
                Copyright 2011. <span style="color: #ff9933; font-weight: bold">xyz</span>
 
  
 
                All Rights Reserved
 
  
 
            </div>
 
  
 
        </div>
 
  
 
        <!-- footer ends -->
 
  
 
    </div>
 
  
 
    </form>
 
  
 
</body>
 
  
 
</html>
       [Serializable()]
    private struct fileInfo
    {
        public string filename;
        public string name;
        public string keywords;
        public string comments;
    }
 
    private List<fileInfo> imagesArray
    {
        get { return (List<fileInfo>)ViewState["imagesArray"]; }
        set { ViewState["imagesArray"] = value; }
    }
 
protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["objUser"] != null)
        {
            objUser = Session["objUser"] as User;
        }
        if (!IsPostBack || object.Equals(imagesArray, null))
        {
            BindSubscriptionList();
            RebindRotator();
 
               // radRotProducts.Attributes.Add("onkeyup", RadAjaxManager1.GetAjaxRequestReference(radRotProducts.
        }
         
    }
 
    protected void BindSubscriptionList()
    {
 
 
 
        imagesArray = new List<fileInfo>();
        DataTable dtAllSubscriptions = (DataTable)Session["dtAllSubscriptions"];
        foreach (string fileName in System.IO.Directory.GetFiles(Server.MapPath("~/Themes/Default/Images/Buttons/BtnProducts/"), "*.png"))
        {
            string fileN = fileName.Substring(fileName.LastIndexOf("\\") + 1);
            string appShortName = fileN.Substring(fileN.LastIndexOf("_") + 1);
            appShortName = appShortName.Substring(0, appShortName.IndexOf("."));
            string filterBySub = "ApplicationShortName ='" + appShortName + "'";
            if (dtAllSubscriptions != null)
            {
 
                DataRow[] rows = dtAllSubscriptions.Select(filterBySub);
                if (rows.Length > 0)
                {
 
                    fileInfo fInfo = new fileInfo();
                    fInfo.name = "~/Themes/Default/Images/Buttons/BtnProducts/" + fileName.Substring(fileName.LastIndexOf("\\") + 1);
                    fInfo.filename = fInfo.name;
                    fInfo.keywords = "Vitti" + fInfo.name;
                    fInfo.comments = fInfo.name + "Vitti";
                    imagesArray.Add(fInfo);
                }
            }
        }
    }
 
 
    private void RebindRotator()
    {
        DataTable rotatorData = new DataTable();
        rotatorData.Columns.Add("Image");
        rotatorData.Columns.Add("Name");
        foreach (fileInfo tempInfo in imagesArray)
        {
            rotatorData.Rows.Add(new string[] { tempInfo.filename, tempInfo.name });
        }
        radRotProducts.DataSource = rotatorData;
        radRotProducts.DataBind();
       //ConfigureRotator(radRotProducts,null);
    }
 protected void LoadProductDescription(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
    {
        Telerik.Web.UI.RadRotatorItem item = e.Item;
        fileInfo fInfo = imagesArray[Convert.ToInt32(item.DataItem.ToString())];
       
        //set the image information
        labelImageComments.Text = fInfo.comments;
        labelImageKeywords.Text = fInfo.keywords;
        labelImageName.Text = fInfo.name;
 
    }   
 
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        
        object item=e.Argument.ToString();
      
        RadRotatorItem radRotItem=new RadRotatorItem(item);
        Telerik.Web.UI.RadRotatorEventArgs ev = new Telerik.Web.UI.RadRotatorEventArgs(radRotItem);
        LoadProductDescription(radRotProducts, ev);
     
    }
Slav
Telerik team
 answered on 19 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?