EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
April 30, 2024, 12:57:49 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Datagrid loaded into center region
Pages: [
1
]
« previous
next »
Print
Author
Topic: Datagrid loaded into center region (Read 17546 times)
jcorral
Newbie
Posts: 14
Datagrid loaded into center region
«
on:
October 14, 2011, 04:11:54 AM »
Hello
I loaded a html page with 2 datagrid in center region via $('#contenido').panel({href:'facturas.html'}) that it´s ok, I have two problems
1-The toolbar not work(I see the caption buttons but not icon and when press not call the function).
2-When collapse west region the datagrid not adjust to center region.
My div center region has this style="overflow:hidden;padding:10px 10px"
what I´m doing wrong?
Thanks
Logged
pacific202
Newbie
Posts: 35
Re: Datagrid loaded into center region
«
Reply #1 on:
October 14, 2011, 06:32:11 PM »
Could you post your code so we can better see what's going on?
Every time I had an issue like this when I was getting started with the library the error was on my part. I had mismatched strings, left out the # in the jquery selector, or something like that. Now when I have this sort of issue I go back and double-check all of my naming and that fixes my issue.
Assuming your name references are correct, the only other thing I could think of is that you have duplicate object id's.
Logged
mzeddd
Full Member
Posts: 223
Re: Datagrid loaded into center region
«
Reply #2 on:
October 14, 2011, 10:24:17 PM »
Quote from: jcorral on October 14, 2011, 04:11:54 AM
2-When collapse west region the datagrid not adjust to center region.
I use following code to adjust DataGrid to "center" region
Code:
<table id="abc" fit="true"></table>
Logged
jcorral
Newbie
Posts: 14
Re: Datagrid loaded into center region
«
Reply #3 on:
October 17, 2011, 12:51:13 AM »
This is the body code, if I put in the div center region an iframe and load this code in the iframe I can see the buttons perfect and work when I press, the adjust to center is not possible in both cases. Thanks
<body>
<table id="dgfac" title="Facturas" class="easyui-datagrid" style="height:340px"
url="manejodatos/facturas/get_fac.php"
toolbar="#toolbar1"
pagination="true"
striped="true"
idfield="id"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="nfactura" width="15" align="right">N Factura</th>
<th field="fechafac" width="15" align="right" formatter="formateafecha">Fecha</th>
<th field="nombre" width="50" >Cliente</th>
<th field="cobrada" width="15" align="center" formatter="formateacobrada">Cobrada</th>
</tr>
</thead>
</table>
<div id="toolbar1">
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newFac()">Añadir</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editFac()">Modificar</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeFac()">Borrar</a>
</div>
<div id="dlgfac" class="easyui-dialog" style="width:400px;height:180px;padding:10px 10px"
closed="true" modal="true" inline="false" buttons="#dlgfac-buttons">
<form id="fmfac" method="post">
<div class="fitem">
<label>Fecha:</label>
<input name="fechafac" id="fechafacid" class="easyui-datebox" required="true">
</div>
<div class="fitem">
<label>Cliente:</label>
<input name="idcliente" class="easyui-combobox" style="width:200px"
url="manejodatos/facturas/comboclientes.php"
valueField="id" textField="nombre" panelHeight="auto" mode="local" required="true"></input>
</div>
<div class="fitem">
<label>Cobrada:</label>
<input name="cobrada" type="checkbox">
</div>
</form>
</div>
<div id="dlgfac-buttons">
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveFac()">Guardar</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlgfac').dialog('close')">Cancelar</a>
</div>
<div style="height:3px"></div>
<table id="dgart" title="Articulos" class="easyui-datagrid" style="height:auto"
toolbar="#toolbar2"
pagination="true"
striped="true"
idfield="id"
rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="descripcion" width="70">Descripcion</th>
<th field="precio" width="20">Precio</th>
<th field="iva" width="10">Iva</th>
</tr>
</thead>
</table>
<div id="toolbar2">
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newArt()">Añadir</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editArt()">Modificar</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeArt()">Borrar</a>
</div>
<div id="dlgart" class="easyui-dialog" style="width:400px;height:380px;padding:10px 10px"
closed="true" modal="true" buttons="#dlgart-buttons">
<form id="fmart" method="post">
<div class="fitem">
<label>Descripcion:</label>
<input name="descripcion" class="easyui-validatebox" required="true">
<div class="fitem">
<label>Precio:</label>
<input name="precio" class="easyui-validatebox" required="true">
</div>
<div class="fitem">
<label>Iva:</label>
<input name="iva" class="easyui-validatebox">
</div>
</div>
</form>
</div>
<div id="dlgart-buttons">
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveArt()">Guardar</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlgart').dialog('close')">Cancelar</a>
</div>
</body>
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...