jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxGrid not refresh work
This topic contains 1 reply, has 1 voice, and was last updated by RenoRain-Chile 9 years, 5 months ago.
-
AuthorjqxGrid not refresh work Posts
-
Al refrescar el GRID sigue aparenciando la informacion anterior o sobre escribe solo la cantidad minima
GRID continues to cool the aparenciando the above information or write only the minimum amount
/* GRID DE COMPRAS ASOCIADAS */
var regCom = {}
var sourceCom =
{
localdata: regCom,
datatype: “array”,
async: false,
datafields: [
{ name: ‘aitem’, type: ‘string’ },
{ name: ‘aproducto’, type: ‘string’ },
{ name: ‘adescripcion’, type: ‘string’ },
{ name: ‘asubtotal’, type: ‘integer’ }
]
};
var dataAdapterCom = new $.jqx.dataAdapter(sourceCom);$(“#GridCompras”).jqxGrid(
{
width: 450,
height: 150,
source: dataAdapterCom,
columnsresize: true,
columns: [
{ text: ‘Item’, datafield: ‘aitem’, width: 100 },
{ text: ‘Producto’, datafield: ‘aproducto’, width: 150 },
{ text: ‘Descripcion’, datafield: ‘adescripcion’, width: 250 },
{ text: ‘Valor’, datafield: ‘asubtotal’, width: 100 }
]
,theme: ‘energyblue’});$.fn.fDatosOS = function( cNroOT, cFiliales){
$.ajax({
url: “sql.php”,
type: “post”,
async: false,
cache: false,
data:{ ordentrabajo:cNroOT,sucursales:cFiliales },
datatype: ‘json’,
success: function(dato){
if(typeof dato != undefined && dato[0] != undefined){
if(dato[0].success == ‘success’){ // Si todo OK
if(dato[0].compras != null){
for(var i=0;i<dato[0].compras.length;i++){
aCompras = {};
aCompras[‘aitem’] = dato[0].compras[i][0];
aCompras[‘aproducto’] = dato[0].compras[i][1];
aCompras[‘adescripcion’] = dato[0].compras[i][2];
aCompras[‘asubtotal’] = dato[0].compras[i][3];
regCom[i] = aCompras;
};
$(‘#GridCompras’).jqxGrid(‘clear’);
$(‘#GridCompras’).jqxGrid(‘updatebounddata’);
}else{
$(‘#GridCompras’).jqxGrid(‘clear’);
$(‘#GridCompras’).jqxGrid(‘updatebounddata’);
};};
};
}
});RESOLVED CHANGE
var regCom = new Array()
and
regCom.length = 0
thank
-
AuthorPosts
You must be logged in to reply to this topic.