Hi Ranadheer,
I suppose that nobody could help you if you don't post any code example which can be used to reproduce your problem.
It is better to post full code inclusive full HTML code If you use JSON or XML, then the test data could be also very important. You could see the data send back to the jqGrid with respect of Fiddler or Firebug.
Regards
Oleg
Hi Sergio,
You JavaScript code has many syntax errors. For example
…
Hi Luigi,
It seems to me that you have problem in your server code. Firs from the screen-shorts which you posted one can see, that you has 1 from 0 pages. So the server returns wrong value for the total value in the JSON response from the server. And it is not the only error.
I have no idea how the server code looks like, but the sipmle SQL quers
SELECT OFFERS.ID, REF_AIRPORT_ID, NAME, LOCATION FROM OFFERS INNER JOIN AIRPORTS ON OFFERS.REF_AIRPORT_ID=AIRPORTS.ID
must give alwasy correct values back. Is you have caching problem and have to flush the changed values to the database or have another error… No idea… Nevertheless I would recommend you to search for the error in the server code.
Ciao
Oleg
Hello,
Your code is relatively long and bad formatted. You write that you have two grids. I suppose one table has id=”datatableoffers” and another one id=”datatableprices”, but you don't include any definition of the second table.
The code which you posted use addfunc instead of just using of
editurl:'http://www.vacanze-viaggi.eu/wp-content/plugins/viaggivacanze/php/edit_dataoffers.php?q=1'
The verification of the data added (which do checkExistsData.php) can do your edit_dataoffers.php code and return an error HTTP code in case of error. As the data the error message can be returned. You can use additionally errorTextFormat event handler to decode/format the message returned by the server.
It is important what return your server after the adding a new row. It should return the id of the new row. If you will use as the add parameters
closeAfterAdd:true, reloadAfterSubmit:false
then the main grid will be not reloaded, the new row will be added to the main grid and the new row will be selected.
If you need to clear the “details” grid (the second grid) you can just use another datatype. Changing the datatype to 'local'
jQuery("#datatableprices").setGridParam({ datatype: 'local' }).trigger('reloadGrid');
will clear the table. By the way initially I would also use datatype:
Could you post more full definition of the jqGrid which you use? Do use use edittype:'file' (see documentation) in the corresponding colModel?
Regards
Oleg
Hi Lo!
Why you use negative value for rowNum? If you want that all rows will be displayed at one you should use a large positive number instead. It mus be not the maximum positive value. The value 10000 or 100000 is more as enough.
Nevertheless I agree, that the reaction of jqGid on the negative numbers which you described is curios, but jqGrid not make verification of the input properties.
Best regards
Oleg
Hi Luc,
If you use 'clientArray' as the url almost nothing will happened during the saving. Only the
Hello Luc,
it seems to me that you can implement your
One can realize it in jqGrid very easy. See this old answer
Hi mikesmith,
You can change the recreateForm option to true for example with the following JavaScript code fragment:
jQuery.extend(jQuery.jgrid.edit, {recreateForm: true});
Best regards
Oleg
Hello Tony
I can conform that the problem with
It seems to me you should only replace
if (rowObject.childNodes[5].textContent == “True”){
to
if (rowObject.childNodes[5].text === “True”) {
see the results. Of case to be able to use gridview: true you should use custom formatter for all coulumns which values you counstruct you currecntly inside of afterInsertRow.
Regards
Oleg
Hi Cas,
I suppose there are a bug in your code. If you post the full code of your current example which reproduce your problem (or post a link to it) I could show it.
Regards
Oleg
Probably custom sorting with sorttype as function or index as function could solve your problem.
In case of index as function it should be declared as
Hi,
look at this old answer
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top