Hi pat and tony,
I met the same problem, and modified the source of grid.celledit.js the following way to meet those requirements.
Here my modifications, at line 72 and following. The principe is just adding a var to receive the value and being able to test it.
Greetings,
zupert
Code :
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<br /> var followEdit = true;<br /> if ($.isFunction($t.p.beforeEditCell)) {<br /> followEdit = $t.p.beforeEditCell($t.rows[iRow].id,nm,tmp,iRow,iCol);<br /> }<br /> if (followEdit !== false) {<br /> $(cc).html("").append(elc);<br /> window.setTimeout(function () { $(elc).focus();},0);<br /> $t.p.savedRow.push({id:iRow,ic:iCol,name:nm,v:tmp});<br /> $("input, select, textarea",cc).bind("keydown",function(e) {<br /> if (e.keyCode === 27) {$($t).restoreCell(iRow,iCol);} //ESC<br /> if (e.keyCode === 13) {$($t).saveCell(iRow,iCol);}//Enter<br /> if (e.keyCode == 9) {$($t).nextCell(iRow,iCol);} //Tab<br /> e.stopPropagation();<br /> });<br /> if ($.isFunction($t.p.afterEditCell)) {<br /> $t.p.afterEditCell($t.rows[iRow].id,nm,tmp,iRow,iCol);<br /> }<br /> }<br /> <br /> |
Man, you know that reading the source code is the best way to learn ?
have a look at the 'cellsubmit' property …
just put
oops
here you got the corrected test :
|
1 2 3 4 5 6 7 |
<br /> if(edtrul.integer == true) {<br /> if(isNaN(val)) return [false,g.p.colNames[valref]+": "+jQuery.jgrid.edit.msg.integer,""];<br /> if ((val < 0) || (val % 1 != 0) || (val.indexOf('.') != -1)) return [false,g.p.colNames[valref]+": "+jQuery.jgrid.edit.msg.integer,""];<br /> }<br /> <br /> |
thanks !
works great, even working with java
keep up the good work !
zupert
hi,
the only I have found to make it work is following :
jQuery.jgrid.edit = {
Hello Tony,
I'm so sorry : i just seen the resetSelection() function ….
Then my problem is just solved : the following code makes all the work :
|
1 2 3 4 5 6 7 8 |
var filas = jQuery("#tabla").getGridParam('selarrrow');<br /> if (filas == null) {<br /> return false;<br /> }<br /> for(var i=filas.length-1; i>=0; i--) {<br /> jQuery("#tabla").delRowData(filas<i>);<br /> }<br /> jQuery("#tabla").resetSelection();</i> |
Thank you very much for this plugin and for you atention !
greetings !
I have a custom button, which status toggles on (un)selecting a rows. Therefor, if the user intends to delete some rows, the selection should remain empty in the end.
But the fact is that if I first delete the rows, then I can't unselect them, and they stay available in the selarrow. (I should have mention that I use multiselect)
On the other side, if I first unselect
Thanks for replying!
Do you have a estimated timeline for this feature ? Cause I'll be waiting for this release …
If it can help you, I'm getting the data fron Java with DWR .
Regards
Hello,
is this feature planned to be supported in a near future ?
because your blugin is really neat, and I'm using it with local data, which makes me the life a litle bit more complex 
greetings
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top