Answering my own post, 3.5 Beta, I am not there yet.
dataUrl? What version of jqGrid, and examples?
Thanks Tony, makes perfect sense, just wanted to make sure I was not missing something.
Thank you Tony!
Concerning your advice on the select optionvalues, I did this because I did not want the lookup data loaded unless the person selects to edit a row or add a new one, I did not know where else to set the col properties. I mean, why load the seelect's lookup data unless the user decides to edit/add rows.
I was trying to understand what you meant by “form edit”, you mean the “edit options” object definition in navGrid? Example:
…
Quite simply actually, I do it with all my selectables:
Do this before you define the jqGrid and make sure async is set to false. If you do not set it to false, the grid will completely render before the data has retuened and the drop down box wil be empty.
Have a internal web-app that has an admin option that allows users to edit the lookup data, like account status, being able to add new statuses or change the description of the status. These tables have a property SortOrder, that is used to determine the order the lookup data should show up. The user would drag and drop the row to where they want it and will update the property in the DB via a jQuery Grid Ajax call.
The definition of the drag feature is dependent on the jquery.tablednd.js plugin, so make sure you have it loaded as part of your app.
The definition of the drag-and-drop feature looks as follows:
(var item is the selector of my grid)
$(item).jqGrid({
…
Thank you for your reply Tony.
Since the tableDnD passes in the row parm I was able to use the setSelection after a 200 milisecond delay:
$(item).trigger('reloadGrid');
You are absolutely right Tony, sorry, I actually changed some of ym code code at the same time as making the upgrade to the new version of jqGrid.
Used TrimEnd(';') in C# to get rid of it.
Thanks heaps Tony, yes you are right more than just the one edit form
Quite simply actually, I do it with all my selectables:
Do this before you define the jqGrid and make sure async is set to false.
Tony just to add my 10c worth.
Scenario: list of products:
column1: edittype: select, list of products
column2: edittype:select, list of pricing schemes for that selected product
On selecting the first cell with list of products, the options in list of pricing schemes meeds to be adjusted automatically via an ajax call to the server that passes ni the select product as parm and get the schemes for it. I was thinking of custom building it but seems to be a catch 22 since you can do a cell edit but cannot do setColProp for the second column or some other method as the second column is active. On selectRow it also has issues with this it seems. Will be great to have surl for this kind of scenario.
Found my issue, the loadComplete function where the click event is set for the column set button is not unique:
$(item+'Pager .tbutton').click(function (){$(item).setColumns(); });
Added the following line to the jqGrid to set a new property for the posted data, but it is not extended/added in grid.celledit.js line 145 in method saveCell. In lines 153 can we add an extend to add the additional custom properties to the post?
Tony, thanks again, but how do I get the new value? and once I have it and compare them to be the same, do I return false to avoid the ajax call?
Thank you Tony! Yes, I simply appended my parms to the url, thanks again. Maybe we can add a parm to indicate the actual field name updated during a cell update so that a person does not have to check each field to see which one was updated, maybe there is a easy way to do it with the existing framework?
Example, the user can update Street Address 1, 2, 3, City, State zip, etc, on the server I have to check on cellEdit which one is not null to figure out what had changed.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top