How to find Jqgrid index index?

I am using Jqgrid to display a table, and I have a primary key with automatic addition as the primary key of the tables. Data is grouped using orderDate, but I don’t know how to access the values ​​of the same orderDate through Jqgrid.

I use this to find the selected row

var rowKey = grid.getGridParam("selrow");

and it returns a value, and if the data was accurate, I would just add 1 to get the correct index for the data I want, but the values ​​are often far apart.

I can combine the data together in a table by changing SQL, but the table still saves orderDate as an index.

Is there an easy way I can just select the next grid line? Or at least find its index?

Thank.

+3
source share
2

getInd , , :

var idx = grid.getInd(rowKey);

( , ):

var dataIDs = grid.getDataIDs();

:

var nextID = (dataIDs.length < idx+1) ? dataIDs[idx+1] : dataIDs[0];

( , , - )

+3

, CellSelect ( rowId) BeforeEditCell (iRow iCol) 1 . IRow ICol -

, Forms ( ), , exel cell

rowEdited [e.AllKeys [0]] = e.AllKeys [0]; saveToDb "Complete_Click"

, , "clientArray" SAVENOW! ( ), saveToDb . :)

0

All Articles