Code:
$('#dg').datagrid({
loadFilter: function(data){
return {
total: data.total,
rows: data.records
}
}
});
loadFilter: function(data){
return {
total: data.total,
rows: data.records
}
}
});
| Home | Help | Search | Login | Register |
|
1
General Category / Help for EasyUI / Re: Datagrid : json data containing "records" instead of "rows"
on: Today at 12:21:27 AM
|
||
| Started by getk - Last post by stworthy | ||
|
Try the 'loadFilter' to change data to what format the datagrid requires.
Code: $('#dg').datagrid({ loadFilter: function(data){ return { total: data.total, rows: data.records } } }); |
||
|
2
on: Today at 12:19:23 AM
|
||
| Started by jpierce - Last post by stworthy | ||
|
The multi-column sorting feature has been posted to our developer team. It will be supported in next version(1.3.4).
|
||
|
3
on: May 17, 2013, 11:29:13 AM
|
||
| Started by cp_Burn - Last post by cp_Burn | ||
|
Thanks for reply.
I solved this problem returning in select an string like this: '<img src="myimage.png" />'. |
||
|
4
on: May 17, 2013, 05:21:39 AM
|
||
| Started by getk - Last post by getk | ||
|
Hi
We have a webservices which provides json data dynamically. Unfortunately, the format is Code: "total":3,"records": [ { "employeeid": "1", "employee_name": "ABC" } ] Essentially its "records" instead of "rows" in the data meta-data. We are not able to change the data coming to us. Can we parse the data to change "records" to "rows" OR is there any-way to populate the data into a grid? |
||
|
5
on: May 17, 2013, 01:30:14 AM
|
||
| Started by motux - Last post by motux | ||
|
Thanks a lot.
I would to add a searchbox but i don't pass variabile name and value. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Rubrica Telefonica - AOUD</title> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/demo/demo.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> <script type="text/javascript"> function doSearch(value,name){ alert('You input: ' + value+'('+name+')'); //WORKS $('#rt').treegrid({ queryParams:{ Colonna: $("#mm").data-options("name").val(), //DON'T WORKS Valore: $("#mm").data-options("value").val() //DON'T WORKS } }); } </script> </head> <body> <h2>Rubrica Telefonica</h2> <div class="demo-info" style="margin-bottom:10px"> <div class="demo-tip icon-tip"> </div> <div>Selezionare la struttura interessata.</div> </div> <div id="tb" style="padding:3px 0px 0px 35%"> <input class="easyui-searchbox" data-options="prompt:'Inserisci valore da ricercare',menu:'#mm',searcher:doSearch" style="width:300px"></input> <div id="mm" style="width:120px"> <div data-options="name:'Nominativo',iconCls:'icon-ok'">Nominativo</div> <div data-options="name:'Telefono'">Telefono</div> <div data-options="name:'Cellulare'">Cellulare</div> </div> </div> <div class="tabrubrica" style="width:95%; height:550px;"> <table id="rt" title="Rubrica Telefonica" class="easyui-treegrid" style="width:100%;" url="treegrid_getdata.php" toolbar="#tb" rownumbers="true" idField="id" treeField="NomeStruttura" data-options="fitColumns:true, fit:true"> <thead> <tr> <th field="NomeStruttura" width="30">Struttura</th> <th field="TitResp" width="10">Posizione</th> <th field="Nominativo" width="25">Nominativo</th> <th field="Telefono" width="10">Telefono</th> <th field="Cellulare" width="10">Cellulare</th> <th field="Mail" width="15">Mail</th> </tr> </thead> </table> </div> </body> </html> |
||
|
6
on: May 17, 2013, 12:56:38 AM
|
||
| Started by melane - Last post by melane | ||
|
Great got it, thanks!
|
||
|
7
on: May 17, 2013, 12:50:52 AM
|
||
| Started by melane - Last post by stworthy | ||
|
Set 'resizable:true' property for columns, just like this
Code: <th field="firstname" width="50" resizable="false">First Name</th> The best way to solve this issue is to use the 'easyui-dialog', please refer to http://jsfiddle.net/vmDP8/11/ |
||
|
8
on: May 17, 2013, 12:30:24 AM
|
||
| Started by melane - Last post by melane | ||
|
Hi,
How exactly can I disable the resizable of easyui ? It looks like this is a default feature of the datagrid as I did not set any resizable options. And when I add resizable="false" option in the declaration of the datagrid, it does change anything, I can still change the size of the headers... Thanks |
||
|
9
on: May 17, 2013, 12:19:38 AM
|
||
| Started by melane - Last post by stworthy | ||
|
No better way to avoid this conflict. So if you want to use the resizable of jqueryui, you must disable the resizable of easyui.
|
||
|
10
on: May 17, 2013, 12:13:26 AM
|
||
| Started by melane - Last post by melane | ||
|
Well,
Thank you, but the question is more about learning on how I could solve this conflict. I am fairly new to jquery and I would like to know if there is a way to prevent this conflict. Is there is a way to override the resize method ? Thanks Melanie |
||