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

Hebrew view (right to left mode)

4 Answers 59 Views
Grid
This is a migrated thread and some comments may be shown as answers.
lea ginsberger
Top achievements
Rank 1
lea ginsberger asked on 07 Jun 2010, 11:21 AM

We encountered some problems in telerik controls when using it for Hebrew view (right to left.(

1.       When adding scroll option to RadGrid, the header row is not shown well, as can be seen in image 'radgrid scroll' attached.

The code in aspx specifying the scroll is:

<Scrolling AllowScroll="true" UseStaticHeaders="true" />

2.       In Scheduler control, the scroll appears as default, and again the header row is not shown well, as can be seen in image 'rad Scheduler' attached.

4 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Jun 2010, 02:04 PM
Hello Lea,

The following code demonstrates a possible workaround for this behavior:
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
   
<script runat="server">
   
    protected void RadGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        DataTable dt = new DataTable();
        DataRow dr;
        int colsNum = 4;
        int rowsNum = 5;
        string colName = "Column";
   
        for (int j = 1; j <= colsNum; j++)
        {
            dt.Columns.Add(String.Format("{0}{1}", colName, j));
        }
   
        for (int i = 1; i <= rowsNum; i++)
        {
            dr = dt.NewRow();
   
            for (int k = 1; k <= colsNum; k++)
            {
                dr[String.Format("{0}{1}", colName, k)] = String.Format("{0}{1} Row{2}", colName, k, i);
            }
            dt.Rows.Add(dr);
        }
   
        (sender as RadGrid).DataSource = dt;
    }
       
</script>
   
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   
<head id="Head1" runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>RadControls</title>
<style type="text/css">
   
.MyGrid .rgHeaderDiv
{
    margin-right:16px !important;
    padding:0 !important;
}
  
.MyGridIE8 .rgHeaderDiv
{
    width:auto !important;
}
   
.MyGrid .rgDataDiv
{
    overflow-y:scroll !important;
}
   
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
  
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <ClientEvents OnResponseEnd="removeWidth" />
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
  
<telerik:RadGrid
    ID="RadGrid1"
    runat="server"
    CssClass="MyGrid"
    Skin="Office2007"
    OnNeedDataSource="RadGrid_NeedDataSource">
    <MasterTableView TableLayout="Fixed" />
    <ClientSettings EnablePostBackOnRowClick="true">
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
        <Selecting AllowRowSelect="true" />
        <ClientEvents OnGridCreated="MyGridCreated" />
    </ClientSettings>
</telerik:RadGrid>
  
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
  
Sys.Application.add_init(removeWidth);
  
function removeWidth()
{
    if ($telerik.isIE8)
    {
        document.body.className += " MyGridIE8";
    }
}
  
function MyGridCreated(sender, args)
{
    if ($telerik.isIE7)
    {
        sender.GridHeaderDiv.style.width = sender.get_element().offsetWidth - 2 - Telerik.Web.UI.Grid.GetScrollBarWidth() + "px";
    }
}
  
</script>
</telerik:RadCodeBlock>
  
</form>
</body>
</html>

Kind regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
lea ginsberger
Top achievements
Rank 1
answered on 13 Jun 2010, 11:04 AM
T
0
lea ginsberger
Top achievements
Rank 1
answered on 13 Jun 2010, 11:13 AM
Thank you!

In radgrid It's worked. But how do that in Scheduler?




0
Peter
Telerik team
answered on 14 Jun 2010, 05:12 PM
Hi lea,

RadScheduler does not support rtl mode -
http://www.telerik.com/products/aspnet-ajax/resources/right-to-left-support.aspx

Please, excuse us for this limitation. RadScheduler is a complex control and after careful assessment of the rtl challenge we have decided that we cannot handle it properly.


Greetings,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
lea ginsberger
Top achievements
Rank 1
Answers by
Daniel
Telerik team
lea ginsberger
Top achievements
Rank 1
Peter
Telerik team
Share this question
or