Forum
10:32
05/08/2013
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:
<script type="text/javascript">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(); </script> </head> <body> <img src="CABECERA.jpg" width="100%"> <label id="lbnombrecarrera"></label> <div width="100%"> <table id="gridclasificacion"></table> <span id="result"></span> </div> <div id="pager"></div> <tbody></tbody> </body>
11:16
Moderators
30/10/2007
Hello,
How do yo set the column to be searchble?
Setting the search tofalse does not make this field searchable.
What is filter label?
When you search on the toolbar the labels of the columns are used or I'm wrong?
The best is to consult first the documentation
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
13:08
05/08/2013
Hello thanks for your response. I mean, i want to people know that the blank label is to search, so i want to show "Search by ..." in every label of the filter, and when people click on them, it dissapear and they can type anything they want to search. Where do i have to set the column no searchable? Because my columns came from a dynamic JSON that changes every minute so i dont define every column in the code...
Regards
Most Users Ever Online: 715
Currently Online:
40 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66