Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
146 views
Hi telerik,

I have Rad Rotator which is working fine in the english version of the page,but in arabic version the slidshow is not happening.
Below is the ascx and ascx.cs file code.
Can u please help me out to sort this issue.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsTicker.ascx.cs" Inherits="UserControls_GI_NewsTicker" %>
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<%@ Register TagPrefix="sfWeb" Assembly="Telerik.Libraries" Namespace="Telerik.Libraries.WebControls" %>
<style type="text/css">  
    *+html .rrItemsList
    {
        float: none !important;
    }
    *html .rrItemsList
    {
        float: none !important;
    }
</style>
<asp:UpdatePanel ID="updatePanel" runat="server">
    <ContentTemplate>
        <div class="newsHeading">
            <asp:Literal runat="server" ID="liLatestNews" Text="<%$ Resources: GlobalResource, LatestNews %>"></asp:Literal></div>
        <div  class="newsContents" >
            <telerik:RadRotator ID="radRotator" runat="server" Height="30px" Width="500px" ItemWidth="500px"
                ItemHeight="30px" FrameDuration="3000" RotatorType="SlideShowButtons" SlideShowAnimation-Duration="3000"
                SlideShowAnimation-Type="Fade" OnItemDataBound="radRotator_ItemDataBound">
                <ControlButtons LeftButtonID="img_Left" RightButtonID="img_Right" />
                <ItemTemplate>
                    <asp:HyperLink runat="server" ID="hlNavigator">
                        <asp:Literal ID="NewsTitle" runat="server" />
                    </asp:HyperLink>
                </ItemTemplate>
            </telerik:RadRotator>
        </div>
        <div class="controls">
            <asp:ImageButton ID="img_Left" runat="server" ImageUrl="~/App_Themes/English/Images/back.png"
                OnClick="Play_Click" />
            <asp:ImageButton runat="server" ID="Play" ImageUrl="~/App_Themes/English/Images/pause.png"
                OnClick="Play_Click" />
            <asp:ImageButton ID="img_Right" runat="server" ImageUrl="~/App_Themes/English/Images/forward.png"
                OnClick="Play_Click" />
        </div>
    </ContentTemplate>
</asp:UpdatePanel>





newsticker.cs file

using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;
using System.ComponentModel;
using Telerik.Cms.Web.UI;
using Telerik.Cms.Engine;
using System.Collections.Generic;
using System.Globalization;
using Telerik.Cms.Data;
using System.Threading;
using System;
using System.Collections;
 
public partial class UserControls_GI_NewsTicker : System.Web.UI.UserControl
{
    #region Public Properties
 
 
    [Category("Data")]
    public string ProviderName
    {
        get
        {
            if (String.IsNullOrEmpty(this.providerName))
                this.providerName = ContentManager.DefaultProviderName;
            return this.providerName;
        }
        set
        {
            this.providerName = value;
        }
    }
 
 
    [Category("Filters")]
    public string CategoryName
    {
        get
        {
            return this.categoryName;
        }
        set
        {
            this.categoryName = value;
        }
    }
    [Category("Filters")]
    public string SortExpression
    {
        get
        {
            return this.sortExpression;
        }
        set
        {
            this.sortExpression = value;
        }
    }
    [Category("Main")]
    [WebEditor("Telerik.Cms.Web.UI.CmsUrlWebEditor, Telerik.Cms")]
    public string MoreInfoUrl
    {
        get { return moreInfoUrl; }
        set { moreInfoUrl = value; }
    }
 
    #endregion
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
 
            IList dataSource = null;
            if (this.manager == null)
                this.manager = new ContentManager(this.ProviderName);
            if (!string.IsNullOrEmpty(this.CategoryName))
            {
                List<IMetaSearchInfo> filter = new List<IMetaSearchInfo>();
                // add a new filter to the list
                filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "Category", this.CategoryName));
                dataSource = manager.GetContent(this.SortExpression, filter.ToArray());
            }
            else
            {
                dataSource = manager.GetContent();
            }
 
            this.radRotator.DataSource = dataSource;
            this.radRotator.DataBind();
 
            radRotator.RotatorType = RotatorType.SlideShow;
        }
    }
 
    private string moreInfoUrl;
    private ContentManager manager;
    private string providerName = "News";
    private string categoryName;
    private string sortExpression = "Position Asc";
 
    protected void radRotator_ItemDataBound(object sender, Telerik.Web.UI.RadRotatorEventArgs e)
    {
        IContent content = (IContent)e.Item.DataItem;
 
        if (content != null)
        {
            HyperLink hlNav = e.Item.FindControl("hlNavigator") as HyperLink;
            Literal newsTitle = e.Item.FindControl("NewsTitle") as Literal;
            if (newsTitle != null)
                newsTitle.Text = content.GetMetaData("SubTitle").ToString();
            string navigateTitle = content.Url.Trim();
            if (Thread.CurrentThread.CurrentUICulture.Name == "en")
                hlNav.NavigateUrl = "~/en/home/mediacentre/news/" + navigateTitle.Replace(". ", "_").Replace(" ", "_").Replace("(", "").Replace(")", "") + ".aspx";
            else
                hlNav.NavigateUrl = "~/ar/home/mediacentre/news/" + navigateTitle.Replace(". ", "_").Replace(" ", "_").Replace("(", "").Replace(")", "") + ".aspx";
        }
    }
    protected void Play_Click(object sender, ImageClickEventArgs e)
    {
        if (radRotator.RotatorType == RotatorType.SlideShow)
        {
            radRotator.RotatorType = RotatorType.SlideShowButtons;
            Play.ImageUrl = "~/App_Themes/English/Images/play.png";
 
        }
        else if (radRotator.RotatorType == RotatorType.SlideShowButtons)
        {
            radRotator.RotatorType = RotatorType.SlideShow;
            Play.ImageUrl = "~/App_Themes/English/Images/pause.png";
 
        }
    }
}
K
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
288 views
Hi Everyone,

I am trying to get an easy way to obtain the Week Number for a given date. I have found the following GetWeekNumber function but it is not the same number that RadCalendar displays.

 

public static int GetWeekNumber(DateTime dtPassed)

 

{

 

 

CultureInfo ciCurr = CultureInfo.CurrentCulture;

 

 

 

int weekNum = ciCurr.Calendar.GetWeekOfYear(dtPassed, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday);

 

 

 

return weekNum;

 

}

 

 

 

Does anyone know how to retrieve the Week number display in the Rad Calendar?

also,

Does anyone know how to select a week based on a Week number  in the Rad Calendar?

 

Your response to this thread would be excellent.

 

Regards,

 

Alberto

Dimo
Telerik team
 answered on 27 Sep 2010
4 answers
307 views
Howdy,

I am using the editor with a custom button which highlights selected text and allows users to make comments on content. I need to set the content area of the editor to read-only, but I don't want to lose my button functionality. I tried enabled = false but that just dumped the content with no toolbar.

Thanks,
David
Delphi
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
130 views
Hi friends!!!!!!!
I am using RagGridView, i want that user should allowed to do single operation at a time, whether he allowed to add the record or he can only edit the record, he will not allowed to do both the operation at once.


How can i achieve this please help?

Thanks in advance.

Manoj Gupta
Princy
Top achievements
Rank 2
 answered on 27 Sep 2010
2 answers
129 views

hi,

i have grid with columntemplate and as a template i use button.

when user clicks that button radwindow shows with proper content

however when user closes that window and starts paging grid that radwindow keeps showing! 

why? what am i  doing wrong?

but when i set in radwindowmanager OnClientClose="Clientclose" where 

function OnClientclose(radWindow) {
  window.location.href = top.location;}

it works fine but i ont want to load the same page again

any help...? pliz

regards

ksysiek

KRZYSZTOF
Top achievements
Rank 1
 answered on 27 Sep 2010
4 answers
133 views
I'm using Telerik,Web.UI with version 2010.2.713.40. I've developed a module for DNN with a RadScheduler control and I want to localize it in spanish.

Usually when I localize a Telerik control I make a copy of the english resource file, in this case RadScheduler.Main.resx, rename it to RadScheduler.Main.es-ES.resx and put it in the App_GlobalResources of the portal (not the App_GlobalResources of the module).

But now this doesn't seemt to work. What i'm doing wrong.

Thanks in advance
Iker Llanos
Top achievements
Rank 1
 answered on 27 Sep 2010
1 answer
114 views
HI i am sameer,

I am using telerik Rad Treeview in DotnetNuke application. I am unable to perform nodeclick event in DotnetNuke application.

My code look like ..

In page load i written

if

 

(!IsPostBack)

 

{

 

RadTreeNode Node = new RadTreeNode();

 

Node.Text =

"Questionnaire Type";

 

Node.ImageUrl =

"../../images/folder.gif";

 

Node.ContextMenuID =

"EmptyFolderContextMenu";

 

Node.Expanded =

true;

 

 

RadTreeNode Node1 = new RadTreeNode();

 

Node1.Text =

"Questionnaire Name";

 

Node1.ContextMenuID =

"MainContextMenu1";

 

Node1.Expanded =

true;

 

 

RadTreeNode Node2 = new RadTreeNode();

 

Node2.Text =

"Question Type";

 

Node2.Expanded =

true;

 

Node1.Nodes.Add(Node2);

 

RadTreeNode Node3 = new RadTreeNode();

 

Node3.Text =

"Question 1";

 

Node3.Expanded =

true;

 

Node2.Nodes.Add(Node3);

Node.Nodes.Add(Node1);

RadTreeView1.Skin =

"Vista";

 

RadTreeView1.Nodes.Add(Node);

}


 

protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)

 

{

Label1.Text =

"NodeClick: " + e.Node.Text;

 

}



whn i debug its going to nodeclick event but i didn't get the value of node click value.

Thanks in advance :)


Yana
Telerik team
 answered on 27 Sep 2010
1 answer
77 views
Hi Telerik Team,

Could you please clarify the following issue.

If i apply Frozen columns to telerik grid by (by using Static Headers=true), can i support the following features to my grid?

1)Column reorder
2)Sorting on Columns
3)Scrollbar movements on user friendly manner

Dimo
Telerik team
 answered on 27 Sep 2010
1 answer
169 views
hi,

in RadAjaxLoadingPanel is sticky mode (the transparent white modal pop up covers all screen), I want to:

1- put div in the middle of this transparent modal pop, where this div contain an image and flash or maybe animated gif (flash is better).
2- how to change the transparency? I need to decrease the transparency.
3- can I change it from white to some other color? if so, how?

thanks,
Dimo
Telerik team
 answered on 27 Sep 2010
1 answer
86 views
hi i m working in rad calendar  i bind event date and click on open rad window 
but when i move mouse in calendar then some date automatically selected and after clickselected  date is unselected
Maria Ilieva
Telerik team
 answered on 27 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?