dataprocessor strange behaviour

I am using grid v1.5 and for some stange reason my dataprocessor is not behaving right. I have a grid with the first column named ID. So whenever a new row is added the id is incremented and the first cell is populated.



mygrid.addRow((mygrid.getRowsNum()+1),[getNextID(),’’,’’,’’,’’,’’,’’,’’],-1)



So when i first loaded the page the grid was empty and i added 7 new rows to the grid with ids 1,2,3,4,5,6,7 and i hit save and the data was saved perfectly. Now i refreshed the same page and deleted all the 7 rows from my grid and added 8 new rows with ids 1,2,3,4,5,6,7,8 it looks like everyting saved right but when i refreshed the page there was only one row in the grid with the id 8. What could be the reasons for this strange behaviour??

The problem is that you are using the same IDs for old and new rows.
You had row with ID = 7 , it was deleted, so grid has a flag "7 - deleted , now you adding new row with ID = 7  and grid has a flag 7 - inserted - so you have two different statuses for the same ID which cause an issue.
Just use more unique IDs for rows, grid.getUID() for example.

if i use a guid then how can i access a perticular row information?? say for example i want to access the 4th cell of my 2nd row usually i so it as mygird.cells(2,4).getValue(). how can i do it now???

Each row has two identities - ID and index.
You can access data by row ID
    grid.cells(id,column_ind).getValue();
or by row index
    grid.cells2(row_index,column_index).getValue();

>>to access the 4th cell of my 2nd row
    mygird.cells2(2,4).getValue()

( The column and row indexes are zero based )