Hi,
Download the examples and see how to use navigator.
Regards
Tony
Since the options array is to big I will not add editRowOnLoad option
Sorry
Regards
Tony
You are right. Changed.
Thank you
Regards
Tony
Just a note. In 3.2 setUrl is removed – instead use setGridParam({url:’myurl’});
Ok. Added.
Currently my time is limited – so do you want to perform some testing?
Regards
Tony
Sachin,
Thank you. Added. Also I will update all other methods that require this.
Regards
Tony
Hi Ton,
One possible solution is to define the initial datatype to clientSide. This way the grid loads without any data. Thus you can define a button something like
$(“#mybutton).click(function() {
$(“#mygrid”).setGridParam({datatype:”xml”}).triger(“reloadGrid”);
$(this).hide();
}
The only problem is that the grid is not initially closed, but I do not think that this solution is applicable to you.
Since the grid is going to more and more event driven I think that one possible solution is to add event when the button at header is clicked – the rest is to make it hidden by initialization. I will think what I can do
Regards
Tony
nickace,
You are right. Such approach can be used for small number of rows – i.e 10-15. I need something similar for my project.
So the solution:
What I think is a more common approach.
What you think if we add a event something like afterInsertRow(rowid) – this event will be raised after every inserted row. This way you can add you custom editRow with parameters what you want.
Regards
Tony
Berus,
The url bug in formedit is corrected and I will publish 3.2 soon.
As for the the “live search” in IE you can simply check this if you run the query in separate ajax call – I mean $.ajax({url:here_the_url_from_jqgrid…}) also pass the appropriate parameters for the paging – see what is the result.
Also check if the first returned xml is valid – You can use FireBug to copy and paste the xml data. Save this in file and open the file with IE.
Regards
Tony
Hi,
This bug is corrected and I will publish the final 3.2 soon. As for now you can change:
if (typeof ts.p.onPaging ==”function”) ts.p.onPaging( this.attr(“id”) );
to
if (typeof ts.p.onPaging ==”function”) ts.p.onPaging( this.id) );
Thanks
Regards
Tony
tirab,
This error tell me that is something wrong when you set the select box values. Here is the right way
colModel [{name:”some”,…,editable: true,edittype:”select”,editoptions:{value:”FE:FedEx;IN:InTime;TN:TNT;AR:ARAMEX”}
See the examples
Regards
Tony
Hi try this
loadComplete: function() {
myids = $(“#mygrid”).getDataIDs; // return the array of the ids
for(var i=0;i<myids.length;i++){
$(“#mygrid”).editRow(myids…);
}
}
Regards
Tony
alche,
You are right – this a missing part of documentation. Now brief example
let suppose that you return from server text of type
type_of_success;message_if_error;the_id_of_the_new_record
Let suppose that there is a error from server then the string maybe should look like this:
error;The type of error message
Thus
…
afterSubmit : function( data_from_server, array_data) {
var result =data_from_server.responseText.split(“;”);
if (result[0] == “error”) {
return [false,result[1]]
} else {
return [true,”,result[2]];
}
}
result[2] is reserved for the id of the grid. If this is new record this value is inserted into the grid. If you do not pass the id the last record+1 is inserted.
array_data is array of the posted data in type name:value
I hope this help a little.
If you have any questions please let me known.
Regards
Tony
Comments are very interesting too.
Hi Ton,
Googling for this I read that these options in IE6 are default, so one possible solution is to check for them – simply check if the browser is IE then make simple ajax and depending on the results alert the users.
Here I found another very interesting article:
http://dean.edwards.name/weblog/2006/04/easy-xml/
Regards
Tony
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top