3.2.0

Right to left direction,

Using Persian language on Iranian websites , we have to change the page direction to right to left usng tags like this :

<div dir=rtl>


or even

<html dir=rtl>


but RTL ( right to left ) direction does not work on the ActiveWidgets grid properly. ( test it ) what is the soloution ?!
Amin
September 19,
I was trying to make right-to-left working with the grid but without success. So far there is no solution.
Alex (ActiveWidgets)
September 19,
I have problem with right to left direction for ActiveWidgets grid
HH
February 5,
With the current version right-to-left is not supported. I will keep it as requirement for version 2.0
Alex (ActiveWidgets)
February 5,
Hi,
Is right-to-left supported now ?? I worked on for sometime but didn't succeed.
Thank you so much.

Fuad
January 3,
Fuad jan,

Add this style to your right-to-left column:

text-align: right; direction:rtl;

It shows the UTF-8 data (in this case Persian text) correctly but there is a problem when user wants to change header witdh of the rtl column, the right border of the header is not available to grab.


<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    
    <title>ActiveWidgets Grid :: Examples</title>

    <style> body, html {margin:0px; padding: 0px; overflow: hidden;} </style>
    
    <!-- ActiveWidgets stylesheet and scripts -->
    <link href="../../runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
    <script src="../../runtime/lib/grid.js"></script>

    <!-- grid format -->
    <style>
        .active-controls-grid {height: 100%; font: menu;}

        .active-column-0 {width:  80px;}
        .active-column-1 {width: 200px; text-align: right; direction:rtl;}
        .active-column-2 {text-align: right;}
        .active-column-3 {text-align: right;}
        .active-column-4 {text-align: right;}

        .active-grid-column {border-right: 1px solid threedlightshadow;}
        .active-grid-row {border-bottom: 1px solid threedlightshadow;}
    </style>

    <!-- grid data -->
    <script>
        var myData = [
            ["MSFT","&#1583;&#1608;&#1583; &#1605;&#1575; &#1585;&#1575; &#1582;&#1608;&#1575;&#1607;&#1583; &#1576;&#1585;&#1583;", "314,571.156", "32,187.000", "55000"],
            ["ORCL", "&#1605;&#1608;&#1578;&#1608;&#1585; &#1605;&#1604;&#1610; &#1576;&#1585; &#1585;&#1608;&#1610; &#1777;&#1780; &#1582;&#1608;&#1583;&#1585;&#1608; &#1576;&#1607;&#8204;&#1591;&#1608;&#1585; &#1570;&#1586;&#1605;&#1575;&#1610;&#1588;&#1610; &#1606;&#1589;&#1576; &#1588;&#1583;", "62,615.266", "9,519.000", "40650"],
            ["SAP", "&#1575;&#1587;&#1575;&#1587;&#1606;&#1575;&#1605;&#1607; &#1588;&#1585;&#1603;&#1578; &#1605;&#1604;&#1610; &#1606;&#1601;&#1578; &#1575;&#1605;&#1587;&#1575;&#1604; &#1576;&#1607; &#1605;&#1580;&#1604;&#1587; &#1575;&#1585;&#1575;&#1610;&#1607; &#1605;&#1610;&#8204;&#1588;&#1608;&#1583;", "40,986.328", "8,296.420", "28961"],
            ["CA", "&#1585;&#1575;&#1607; &#1670;&#1575;&#1585;&#1607; &#1581;&#1605;&#1604; &#1608; &#1606;&#1602;&#1604; &#1593;&#1605;&#1608;&#1605;&#1610; &#1575;&#1587;&#1578;", "15,606.335", "3,164.000", "16000"]
        ];

        var myColumns = [
            "Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"
        ];
    </script>
</head>
<body>
    <script>

    //	create ActiveWidgets Grid javascript object
    var obj = new Active.Controls.Grid;

    //	set number of rows/columns
    obj.setRowProperty("count", 4);
    obj.setColumnProperty("count", 5);

    //	provide cells and headers text
    obj.setDataProperty("text", function(i, j){return myData[i][j]});
    obj.setColumnProperty("text", function(i){return myColumns[i]});

    //	set headers width/height
    obj.setRowHeaderWidth("28px");
    obj.setColumnHeaderHeight("20px");

    //	set click action handler
    obj.setAction("click", function(src){window.status = src.getItemProperty("text")});

    //	write grid html to the page
    document.write(obj);

    </script>
</body>
</html>
yamyam
January 3,
After posting the example I see that the Unicode text is messed up. It is supposed to be unicode data, so replace that.

For those who dont have any unicode language setup on ther pc , copy paste come text from this site: http://www.irangreenpen.org/ to myData[]
yamyam
January 3,

This topic is archived.

See also:


Back to support forum