Hi! I dont have much idea of javascript, so i'm a lost doing that. I have a classification grid and I want a filter in order to people can search his number, but i've tried to do it following examples getting no result. I dont know where i have to type “filtertoolbar”.
Here there is an example of my grid http://www.serbloc.es/Monitor/index.html. And the plain javascript/html:
function refreshClasificacion(){$.getJSON( "datos.json", function( datos ) {$.each(datos.clasificacion.datos, function(key1, val1) {jQuery("#gridclasificacion").setRowData(key1,(function() {var r={};$.each(datos.clasificacion.colmodel, function(key2, val2) {r[val2.name]=val1[key2];})return r;})());})jQuery("#gridclasificacion").trigger("reloadGrid");});setTimeout("refreshClasificacion()",500);}function loadClasificacion(){$.getJSON( "datos.json", function( datos ) {jQuery("#gridclasificacion").jqGrid({datatype: "clientSide",autowidth: true,height: "auto",colNames:datos.clasificacion.colnames,colModel:datos.clasificacion.colmodel,scrollOffset:0,altRows: true,datatype: 'local',gridview: true,gridComplete: function() {$("tr.jqgrow:odd").css("background", "#8DD5D5");},rowNum:150, sortname: datos.clasificacion.sortname, }); $.each(datos.clasificacion.datos, function(key1, val1) { jQuery("#gridclasificacion").addRowData(key1,(function() { var r={}; $.each(datos.clasificacion.colmodel, function(key2, val2) { r[val2.name]=val1[key2]; }) return r; })() ); }) jQuery("#gridclasificacion").trigger("reloadGrid"); }); }loadClasificacion();refreshClasificacion();![]()
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top