Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Filtertoolbar
06/08/2013
10:32
Avatar
kike_4
Member
Members
Forum Posts: 3
Member Since:
05/08/2013
sp_UserOfflineSmall Offline

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>
Sorry for my english and thank you in advance.
06/08/2013
11:09
Avatar
kike_4
Member
Members
Forum Posts: 3
Member Since:
05/08/2013
sp_UserOfflineSmall Offline

Ok, at last I've done it! But now i have another problem. I dont want filter in every column, how can i hide filter in a column? And how can i put a "Filter" label ? Thanks

06/08/2013
11:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

06/08/2013
13:08
Avatar
kike_4
Member
Members
Forum Posts: 3
Member Since:
05/08/2013
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information