grid duplicate rows on srnd mode

hi,



i m using dhtmlxgrid on srnd mode and loading data from server by xml. i m loading 12 rows firstly, but when i load 13. row

12. row loading again. but this issue is only for 12. row. when i load other rows, there is no problem…



firstly grid source is;



<?xml version="1.0" encoding="utf-8"?>





HAKU�R00013





HASUDN00012





DCDSCDCC00011





HPLTL00010





HRUKE00009





HRUKE00008





HPLEL00007





HPLEL00006





HSLSU00005





HSLSU00004





HORSU00003





HOREL00001







and when i scroll firstly xml like ;



<?xml version="1.0" encoding="utf-8"?>





HAKU�R00014





HAKU�R00013







id 13 comes twice…

also i tried this sample with 10000 test rows and only 12. row is duplicate…



i think startPos parameter in the request is coming false on first scroll…

(

on first load url : getGridRecords.aspx?startPos=0&count=12

on first scroll url : getGridRecords.aspx?startPos=12&count=12

on second scroll url : getGridRecords.aspx?startPos=25&count=12

on third scroll url : getGridRecords.aspx?startPos=38&count=12

and so on…

)



sample code;



















how can i resolve this?



thanks in advance…

The problem is in your server side code, it returns incorrect data on second call
Request is getGridRecords.aspx?startPos=12&count=12

    startPos=12 which mean output must start from position 12 , position is != id

In your case
id    pos
1      0
3      1
4      2
5      3
6      4
7      5
8      6
9       7
10      8
11      9
12      10
13      11
14      12

So position 12 is related to record with ID 14 ( record with ID 13 has position 11 and must not be outputed )
All other errors are result of incorrect data output ( dupplicate ID ) which may result in very different errors