yamilbracho
|
 |
« on: June 08, 2015, 01:26:55 PM » |
|
Hi I have a combogrid and a datagrid with checkboxes and I would like, when i selected a option from the combo, the datagrid show the items selected for that particular value. My code :
$('#cc').combogrid({ onChange:function(newValue, oldValue) { console.log('newValue=' + newValue); $('#dg').datagrid('reload',{ id_canal : newValue }); } });
In the url i recive the id_canal value and returns the items this way :
{"total":28,"rows":[{"ck":true,"id_clasificacion":1,"tx_clasificacion":"INDIVIDUALES"},{"ck":false,"id_clasificacion":2,"tx_clasificacion":"CUENTAS"},{"ck":false,"id_clasificacion":3,"tx_clasificacion":"PETSHOP"},{"ck":false,"id_clasificacion":4,"tx_clasificacion":"MEDICOS AFILIADOS MEDICHAT"},{"ck":false,"id_clasificacion":5,"tx_clasificacion":"NACIONALES"},{"ck":false,"id_clasificacion":6,"tx_clasificacion":"ASISTENCIA MEDICA A DOMC"},{"ck":false,"id_clasificacion":7,"tx_clasificacion":"REVISTA"},{"ck":false,"id_clasificacion":8,"tx_clasificacion":"SIN FINES DE LUCRO"},{"ck":false,"id_clasificacion":9,"tx_clasificacion":"TU DESCUENTON"},{"ck":false,"id_clasificacion":10,"tx_clasificacion":"COLECTIVO"}]}
and my datagrid definition is :
<table id="dg" title="Clasificacion" class="easyui-datagrid" style="width:550px;height:250px" url = './clasificacion_canal/crud_clasificacion_canal.php?action=ARCL&id-canal=1' idField="id_clasificacion" pagination="true" data-options="rownumbers : true" iconCls="icon-save"> <thead> <tr> <th field="ck" checkbox="true"></th> <th field="id_clasificacion" width="80">Código</th> <th field="tx_clasificacion" width="500">Nombre</th> </tr> </thead> </table>
I am not sure if the reload method is called because the checkboxes are not updated....
Any hint ?
|