EasyUI Forum
June 16, 2024, 05:49:37 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: data dont appear in a datagrid  (Read 5361 times)
forum6691
Newbie
*
Posts: 39


View Profile
« on: July 09, 2016, 09:30:53 AM »

I try to add value in a datagrid.
The following code doesn't show anything in the data grid

HTML
Code:
<table id="listeRegates" class="easyui-datagrid" style="height:450px"
       title="Regates/Courses chargees" iconCls="icon-save"
       sortName="date" sortOrder="asc"
       rownumbers="true" pagination="true"
       toolbar="#tb">
    <thead>
        <tr>
            <th field="regate" width="120" sortable="true">Regate/Course</th>
            <th field="date" width="60" sortable="true">Date debut</th>
            <th field="description" width="120" sortable="true">Description</th>
            <th field="organisateur" width="80" sortable="true">Organisateur</th>
            <th field="demo" checkbox="true" width="80" align="right" sortable="true">Demo</th>
            <th field="affichage" checkbox="true" width="120" align="right" sortable="true">Affichage autorise</th>
            <th field="supprimer" checkbox="true" align="center" width="60">A supprimer</th>
        </tr>
    </thead>
</table>
<div id="tb" style="padding:2px 5px;">
    Date From: <input class="easyui-datebox" style="width:110px">
    To: <input class="easyui-datebox" style="width:110px">
    <a id="btn_remove" href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true">Remove record</a>
</div>

the javascript code
Code:
$(document).ready(function(){

    $('#listeRegates').datagrid({
        data:[{
"regate": "Régate démo 1",
"date": "2014-01-01",
"description": "Régate d'hiver dans la baie d'Hyères",
"organisateur": "Hyères Plaisance Organisation",
"demo": "1",
"affichage": "1",
"supprimer": "0"
        }, {
"regate": "Régate démo 2",
"date": "2014-05-01",
"description": "Régate de printemps entre La Londe et Cavalaire",
"organisateur": "La Londe Plaisance Organisation",
"demo": "1",
"affichage": "1",
"supprimer": "0"}]
    });
});

I get the following on the screen (see enclosed file datagrid.gif)
Is a problem with my format of data ?




Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 10, 2016, 03:49:41 AM »

Please look at this example http://code.reloado.com/ewawem3/edit#preview. It works fine.
Logged
forum6691
Newbie
*
Posts: 39


View Profile
« Reply #2 on: July 10, 2016, 08:46:54 AM »

Very strange ?
It's seems the same code and it's OK on reloado.com, and KO on my web site ?
« Last Edit: July 10, 2016, 09:10:15 AM by forum6691 » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!