This is a migrated thread and some comments may be shown as answers.

How to use LocalizationPath property?

2 Answers 74 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Melvin asked on 27 Aug 2015, 08:44 PM


 I have a problem when I use the LocalizationPath, because these not taken the content that I define in my file resource. I´ve defined the gantt chart from code.

 Here my code C#

private void agregarColumna(string DataField, string Header, int tamano, RadGantt ctrlGantt)
    GanttBoundColumn gbc = new GanttBoundColumn();
    gbc.DataField = DataField;
    gbc.HeaderText = Header;
    gbc.Width = Unit.Pixel(tamano);
private void CargarGraficoGantt(DataTable dtGantt)
    RadGantt rgGantt = new RadGantt();
    rgGantt.ID = "GraficoGantt";
    rgGantt.SnapToGrid = false;
    rgGantt.ReadOnly = true;
    rgGantt.AllowSorting = false;
    rgGantt.SelectedView = GanttViewType.MonthView;
    rgGantt.AutoGenerateColumns = false;
    rgGantt.EnableViewState = true;
    rgGantt.EnablePdfExport = true;

   rgGantt.Culture = System.Globalization.CultureInfo.CreateSpecificCulture("es-ES");​

    //rgGantt.LocalizationPath = "App_LocalResources/";
    //rgGantt.Width = Unit.Percentage(100.0);
    //rgGantt.Height = Unit.Percentage(100.0);
    agregarColumna("ID", "Id", 50, rgGantt);
    agregarColumna("Title", "Tareas a Desarrollar", 350, rgGantt);
    agregarColumna("PercentComplete", "Porcentaje", 80, rgGantt);
    rgGantt.DataBindings.TasksDataBindings.IdField = "ID";
    rgGantt.DataBindings.TasksDataBindings.TitleField = "Subject";
    rgGantt.DataBindings.TasksDataBindings.StartField = "Start";
    rgGantt.DataBindings.TasksDataBindings.EndField = "End";
    rgGantt.DataBindings.TasksDataBindings.ParentIdField = "ParentID";
    rgGantt.DataBindings.TasksDataBindings.SummaryField = "summary";
    rgGantt.DataBindings.TasksDataBindings.PercentCompleteField = "PercentComplete";
    rgGantt.DataSource = dtGantt;
    rgGantt.Skin = "Bootstrap";
protected void Page_Load(object sender, EventArgs e)
    if (!IsPostBack)
        DataTable tasks = new DataTable();
        tasks.Columns.Add(new DataColumn("ID", typeof(int)));
        tasks.Columns.Add(new DataColumn("ParentID", typeof(int)));
        tasks.Columns.Add(new DataColumn("Subject", typeof(string)));
        tasks.Columns.Add(new DataColumn("Summary", typeof(bool)));
        tasks.Columns.Add(new DataColumn("PercentComplete", typeof(decimal)));
        tasks.Columns.Add(new DataColumn("Start", typeof(DateTime)));
        tasks.Columns.Add(new DataColumn("End", typeof(DateTime)));
        tasks.Rows.Add(1, null, "Defining selection", false, 0.1, new DateTime(2015, 8, 2), new DateTime(2015, 9, 4));
        tasks.Rows.Add(2, null, "Researching the market for candidates", true, 0, new DateTime(2015, 8, 3), new DateTime(2015, 8, 15));
        tasks.Rows.Add(3, 2, "Advertising the position", false, 0.3, new DateTime(2015, 8, 10), new DateTime(2015, 8, 15));
        tasks.Rows.Add(4, 2, "Collecting job applications", false, 0.5, new DateTime(2015, 8, 10), new DateTime(2015, 8, 15));
        tasks.Rows.Add(5, null, "Categorizing applications", false, 0.5, new DateTime(2015, 8, 17), new DateTime(2015, 8, 22));
        tasks.Rows.Add(6, null, "Assessing applicants", true, 0, new DateTime(2015, 8, 19), new DateTime(2015, 8, 31));
        tasks.Rows.Add(7, 6, "Interview with Human Resources representatives", false, 0.2, new DateTime(2015, 8, 24), new DateTime(2015, 8, 26));
        tasks.Rows.Add(8, 6, "Asigning and reviewing a sample test task", false, 0.2, new DateTime(2015, 8, 24), new DateTime(2015, 8, 27));
        tasks.Rows.Add(9, 6, "Interview with Development representatives", false, 0.6, new DateTime(2015, 8, 26), new DateTime(2015, 8, 28));
        tasks.Rows.Add(10, null, "Creating and proposing the job offer", false, 0.7, new DateTime(2015, 8, 27), new DateTime(2015, 8, 29));
        tasks.Rows.Add(11, null, "Hiring applicant", false, 0.4, new DateTime(2015, 8, 25), new DateTime(2015, 8, 31));
        rgDemo.DataSource = tasks;
        rgDemo.AutoGenerateColumns = true;
        rgDemo.Skin = "Bootstrap";
        rgDemo.MasterTableView.DataKeyNames = new string[] {"ID"};

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfDemo.aspx.cs" Inherits="testTelerik.wfDemo" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI.Gantt" tagprefix="cc1" %>
<!DOCTYPE html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="css/Glow/Grid.Glow.css" rel="stylesheet" />
    <link href="css/Bootstrap/Grid.Bootstrap.css" rel="stylesheet" />
    <link href="css/Glow/Ajax.Glow.css" rel="stylesheet" />
    <link href="css/Glow/Gantt.Glow.css" rel="stylesheet" />
    <link href="css/Glow/Input.Glow.css" rel="stylesheet" />
    <link href="css/Bootstrap/TabStrip.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/Input.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/Gantt.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/Calendar.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/Scheduler.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/SchedulerRecurrenceEditor.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/SchedulerReminderDialog.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/Window.Bootstrap.css" rel="stylesheet" />
    <link href="css/Bootstrap/Menu.Bootstrap.css" rel="stylesheet" />
    <form id="form1" runat="server">
        <telerik:radscriptmanager runat="server"></telerik:radscriptmanager>
        <telerik:RadAjaxLoadingPanel ID="ralpGantt" runat="server" Skin="Glow"></telerik:RadAjaxLoadingPanel>
        <div class="container" id="divContenedor" runat="server">
            <ul class="nav nav-pills">
                <li class="active"><a data-toggle="tab" href="#divGrid">Grid</a></li>
                <li><a data-toggle="tab" href="#divGantt">Gantt</a></li>
            <div class="tab-content">
                <div id="divGrid" class="tab-pane fade" runat="server">
                    <telerik:radgrid ID="rgDemo" runat="server"></telerik:radgrid>
                <div id="divGantt" runat="server" class="tab-pane fade in active">
        <telerik:radcodeblock runat="server">
            <script src="jquery.loadmask.js"></script>
            <script src="bootstrap-remote-tabs.js"></script>

 But if I enabled this line


rgGantt.LocalizationPath = "App_LocalResources/";

The content gantt chart does not shows.

What is wrong in my code?











2 Answers, 1 is accepted

Sort by
Aneliya Petkova
Telerik team
answered on 28 Aug 2015, 08:37 AM
Hi Melvin,

I tested the code you sent, and everything works as expected at my side. Attached you may find the project I tested with(see Default.aspx).

Please note that the RadGantt control relies on RadGantt.resx file, not RadGantt.Main.resx and if you are using es-ES culture, the resx file must be named

Hope this will be helpful.

Aneliya Petkova
Top achievements
Rank 1
answered on 28 Aug 2015, 01:54 PM
Ok, thanks for your answer
Asked by
Top achievements
Rank 1
Answers by
Aneliya Petkova
Telerik team
Top achievements
Rank 1
Share this question