It do work with loadonce:true, but you should take in the consideration when you should call the $(“#grid”).jqGrid('getGridParam','data'). You can do this after the data
From the “long” problem description which you posted it is not clear whether you need to set the cell color or the row color. About different ways of changing of the cell color see here.
If you need change the row color you should take in the consideration that the rowid (the value “3” in your example) is just the id of the
Ohhh, Chico!!!
It seems to me you are master to make simple things complex. Sorry!
The problem is that Tree Grid is implemented to support only remote data: datatype:”json” and treedatatype: “json”. The “local” datatype is not full supported. For example you can't fill the tree grid using datatype:”local”, treedatatype: “local” and data:this.Data. There are a workaround if you use addJSONData, but it is the workaround only and not real the main way implemented by design.
So I recommend you to change your code and use the url parameter of jqGrid. jqGrid will get asynchronous requests to the server and fill the jqGrid contain with the server resonse. In the case you will have no problems and on the node expanding a new request to the server with additionally parameters, which describes the current node, will be send to the server.
If needed you can use functions in the jsonReader.
Best regards
Oleg
There are no jQuery 1.4.2 file on your web site: The file
http://www.herpescureresearch.org/meter/jgrid/js/jquery-1.4.2.min.js
can not be found. It seems that you have the jquery-1.5.2.min.js instead. You chould change your code.
Best regards
Oleg
It's depend on environment which you use. It you has ant tool, then see here. Other way could be to concatinate all jqGrid modules which you need in one file and run any minification tool (see here), for example YUI Compressor. It is important to hold the order of some jqGrid modules. I recommend you to open jquery.jqGrid.min.js and examin the order of modules in the comment at the beginning of jquery.jqGrid.min.js:
Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; grid.filter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.grouping.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.tbltogrid.js; grid.jqueryui.js;
If you are sure that you don't need some from the modules you can reduce the list.
I hope that in the short time will be published jqGrid 4.0.1. If it will be before your development will be finished you will need nothing to do.
Best regards
Oleg
It is one of the most frequently reported bugs. It is fixed (see here) in the next days after the version 4.0.0 was published. If you use jquery.jqGrid.src.js you can do the same modifications yourself. You can consider to download the latest version of jqGrid from the github.com. In the case you should include every jqGrid module which you use instead of one jquery.jqGrid.src.js file (see here for details).
Best regards
Oleg
Hello Chico,
Sorry, but I don't understand what you do. Which “data array” and how you update? What you do inside of onSelectRow event (onRowSelected event not exist)?
I hate if one explains about the program instead of just posting the code. The code say what you do and the explanation say only what you want to do.
There are many possibility to solve you problem. For example you can use postData parameter to send edditional (also absolutely dynamic) informations to the server of you can change any time the value of url parameter of jqGrid. The event onCellSelect is one more event which can be helpful for you. If all this gives you not what you need you can find “div.treeclick” elements unbind the original onclick event handler and bind you own one (see here).
The main problem is that I don't really understand your problem and so it's difficult for me to recommend you somthing, because some more simple thing probably can solve your problem.
Best regards
Oleg
Hello,
the most things are possible. It is just important to understand that you can any time change the value of the datatype parameter. If you initially use datatype:'local' you can fill the data with respect of data parameter for example. Then you can change the value of the datatype
Hello Chico80,
what you asked is already the default behavior of the Tree Grid. If the user expanding the tree node it will be additional request to the server will be send where three additional parameters will be send: nodeid, parentid and n_level
Hello!
There are different forms for commercial and open sorce free version of jqGrid. Because you use commertial version you should post your question in another forum.
Best regards
Oleg
Inside of onContextMenu event handler you can use
var rowId = $(event.target).closest("tr.jqgrow").attr("id");
to get the rowId. Inside of 'edit', 'add' and other popup menu handler you can use t.id
I find encoding of large texts not the best way. With respect of Encoding.UTF8.GetBytes or Encoding.ASCII.GetBytes you can get byte representation of any string and with respect of MD5CryptoServiceProvider.ComputeHash you can calculate the MD5 from the bytes. Then you can convert the MD5 value to HEX or to Base64. In the database you can save the MD5 directly as binary and in HTML use the values converted to HEX or to Base64. So instead of the usage long (even encoded) texts as id you can use short values.
Regards
Oleg
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top