jqGrid row selected but not highlighted -
I want to select and deselect a row multiple times.
My code is so far: ( last selected
is a global var
):
first selection Do: Function (id) {if (lastSelected! == id) {grid setSelection (ID); Final selected = id; Return; } And {grid.reset selection (ID); Final selected = faucet; }}
The code works fine, but the row is highlighted only after the first click. Click the second time to highlight it and when I click it next time, and it is clicked after 3 times, 5th, then it is undeclared ... it behaves like the ones (I have Modal is the row that is selected, then the crop occurs), but is not highlighted.
without grid.getSelection (id)
This will not be highlighted at all, but it is still working as though it was selecting and unselecting.
It looks like the main error in your code first select
return If the value is not returned to setSelection
is to be unselected. Could.
To fix the problem, you should return the false
to first select
. In addition, I recommend using the grid
variable instead of $ (this)
and use the standard selrow
parameter of jqGrid instead of use To make the previous selected
variable resultant code may be
Select before: function (row, e) {Var $ self = $ (this), selectedRowid = $ self JqGrid ("Getgraig Para", "Sero"); If (selected rovid === queued) {$ self.jqGrid ("Resetsetback"); } And {$ self.jqGrid ("setSelection", queued, true, e); } return false; // do not process standard selection)
There is a related demo.
Comments
Post a Comment