I have manged to fix this by adding the 'index' option to each column. Is this now mandatory for local search?
Hi Oleg,
Again, thanks for your help!
I need to use the loadonce (for cleint side sorting, etc). But, using your suggestions, I have now been able to design a very nice generic way for my custom formatters, which could now be used by any of my jqGrids. Here is an example (we could maybe share thsi with the community):
OverdueDate_formatter = function (cellvalue, options, rowObject,iCol,sColName){
Hi Oleg,
You're the man!! This sorted it out.
Thanks!
Cas
Hi Oleg,
Here is my current formatter function:
ProjectLink_formatter = function (cellvalue, options, rowObject){
Thanks for the reply. But, I still don;t understand how that will fit into a Custom Formatter function?
Hi Oleg,
Using just the “text” property did not work. But the following code worked:
Hi Oleg,
jqGrid Defaults:
Hi Oleg,
When I put the alert(rowObject.childNodes[5].textContent); debug statement in the formatter function, it does return the values. It just seems to ignore it in the if (rowObject.childNodes[5].textContent == “True”) condition. Any ideas?
Thanks,
Cas
Hi Oleg,
After implementing the custom formatter, I'm getting closer to the solution.
However, I'm facing this issue now:
If I add the following code in my custom formatter function, the data is displayed correctly in the gird, and the sorting works well:
return “” + $.fmatter.util.DateFormat(“m/d/Y”,cellvalue,”d M Y”,$.jgrid.formatter.date) + ““;
When I however add a condition into this function, the data is still diplayed correctly, but the moment I sort, all the rows disappear from the grid:
Hi Oleg,
I'm trying your suggestion of custom formatter and unformatter, but with no luck. Can you please give me some guidance: I've got a date column that comes in the XML in format m/d/Y. I want to display this in the jqGrid in the format d M Y. But, I also want to be able to sort this column in date order.
Can you please give me the code for the colmodel, as well for the formatter and unformatter fucntions?
Thanks,
Cas
Hi Oleg,
I have removed the datefmt: 'd m Y', and also added: formatoptions:{srcformat:'m/d/Y',newformat:'d M Y'}.
This still works on version 3.6.5, but breaks on 3.72 and 3.8.
Thanks,
Cas
Hi Oleg,
Sorry, I forgot to post the jqGrid defaults. Here it is:
Hi Oleg,
I'm using the grid.locale-en.js language file. I'm using an XML data source, and not JSON. Here's an extract of my XML:
82 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/Banking – Italian Casino0099992 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/Banking – WebECash NET0099992 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/Project Brooklyn (Affiliates Redesign)0299992 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/Business Applications – Affiliates – Spiral Upgrade Project0099992 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/Business Applications – Game Recommendation Engine0099992 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/Business Applications – Vision – Cashier Management System0099996 On HoldGreen3/31/2010Truehttp://derpwa3/EPM2007/Collusion and Fraud Control (CFC)1299992 ActiveGreen11/10/2010Falsehttp://derpwa3/EPM2007/OLR-NET v16009999
Thanks,
Cas
Hi,
Has anyone found a sloution yet?
Thanks!
Here's me detailed grid definition:
$(“#tblActiveProjects”).jqGrid({
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top