Title: Datagrid loaded into center region Post by: jcorral 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 Title: Re: Datagrid loaded into center region Post by: pacific202 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. Title: Re: Datagrid loaded into center region Post by: mzeddd on October 14, 2011, 10:24:17 PM 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> Title: Re: Datagrid loaded into center region Post by: jcorral 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> |