We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to configure the localization of the PHP grid????

Thread ID:

Created:

Updated:

Platform:

Replies:

129825 Apr 5,2017 06:46 AM Apr 7,2017 07:03 AM PHP 2
loading
Tags: Grid
dan
Asked On April 5, 2017 06:46 AM

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!-- Essential Studio for JavaScript theme reference -->

<link rel='nofollow' href="themes/default-theme/ej.web.all.min.css" rel="stylesheet" />

<!-- Essential Studio for JavaScript script references -->

<script src="scripts/external/jquery-3.1.1.min.js"></script>

<script src="scripts/external/jsrender.min.js"></script>

 <script src="scripts/i18n/ej.culture.ru-RU.min.js"></script>
    <script src="scripts/l10n/ej.localetexts.ru-RU.min.js"></script>



<script src="scripts/web/ej.web.all.min.js"> </script>

<!-- Add your custom scripts here -->
    </head>
<body>
<?php
require_once 'Src/AutoLoad.php';
?>
<div class="cols-sample-area">
    <?php
// setlocale(LC_ALL, 'ru_RU.utf8');
   // Header("Content-Type: text/html;charset=UTF-8");
  //  $Json = json_decode(file_get_contents("data.json"), true);
$items = array(
array(
"OrderID"=> 10,
    "CustomerID"=>  "ВАСЯ"),
array(
"OrderID"=> 20,
    "CustomerID"=>  "Петя ") 
     
);
$Json = $items;//json_decode(json_encode($items), true);

echo '<pre>'.print_r($Json, true).'</pre>';
//echo ($Json);
    $col1 = new EJ\Grid\Column("locale");
    $col1->field("OrderID")->headerText("OrderID")->textAlign("right")->isPrimaryKey(true)->width(100);
    $col2 = new EJ\Grid\Column();
    $col2->field("CustomerID")->headerText('CustomerID')->textAlign('right')->format('{0:C}')->width(70);
  /*  $col3 = new EJ\Grid\Column();
    $col3->field("EmployeeID")->headerText("EmployeeID")->textAlign("right")->width(70);
    $col4 = new EJ\Grid\Column();
    $col4->field("ShipCountry")->headerText("ShipCountry")->width(70);
    $col5 = new EJ\Grid\Column();
    $col5->field("Freight")->headerText("Freight")->textAlign("right")->format("{0:C}")->width(70);*/
    $gridColumns = array($col1,$col2/*,$col3,$col4,$col5*/);
    $grid =  new EJ\Grid("Grid");
    $edit =new EJ\Grid\EditSetting();
    $toolbarItems = array("add","edit","delete","update","cancel");
    $toolbar= new EJ\Grid\ToolbarSetting();
    echo $grid ->locale("ru-RU") -> dataSource($Json) -> allowPaging(true)->columns($gridColumns)->editSettings($edit->allowEditing(true)->allowDeleting(true)->allowAdding(true))->toolbarSettings($toolbar->showToolbar(true)->toolbarItems($toolbarItems))->render();
    ?>

</div>
</body>


Attachment: im_ERR_798444d2.rar

dan
Replied On April 6, 2017 02:41 AM

I find problem with encodin UTF-8 with russian sumbol

like file SERIALIZE.PHP serch json_encode

add  param   JSON_UNESCAPED_UNICODE

 json_encode($array, JSON_UNESCAPED_UNICODE)

Thavasianand Sankaranarayanan [Syncfusion]
Replied On April 7, 2017 07:03 AM

Hi Dan. 
 
We noticed that you have created an incident for the same query under your Direct-trac. Please follow-up with the incident for further assistance. 
 
 
Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;