serverSide

serverSide

jfrjfr Posts: 71Questions: 24Answers: 0

Hi

I am trying to return serverside data to datatable

first if I put
"scroller": true
then there will bee multiple fetch but if i put
"scroller": { "displayBuffer": 75, "loadingIndicator": true, "serverWait": 50 }
I will have only 1 fetch done

In the xhr header, datatable will send for the first record
start:0
length:9
so I return from record 1 to 9

second
start:6
length:108
so I return from record 7 to 114

third
start:34
length:108
so I return from record 35 to 149

My question here is why length of 108 when datatable is using only a portion of it
I'm I following the wright logic or is it something else that I do not know

Thank in advance

Answers

  • allanallan Posts: 61,773Questions: 1Answers: 10,112 Site admin

    Scroller will request more than just the rows shown to allow for smoother scrolling. You've set the displayBuffer option to 75 which means that it should request 75 * the number of rows that can be shown!

    This old blog post that introduces Scroller shows a diagram that demonstrates how Scroller works. Looks like there is an error loading the data on the page, but the description text is still correct.

    Allan

  • jfrjfr Posts: 71Questions: 24Answers: 0

    Hi Allan
    I understand that
    My biggest problem is when I code
    "scroller": { "displayBuffer": 75, "loadingIndicator": true, "serverWait": 50 }
    instead of "scroller": true
    it does not seam to work
    I fetch only 1 draw even if I have a lot more

    Thanks

  • allanallan Posts: 61,773Questions: 1Answers: 10,112 Site admin

    If you could post a link to a test case showing the issue I can take a look into it.

    Allan

  • jfrjfr Posts: 71Questions: 24Answers: 0

    Hi Allan
    I send you an email
    Thanks

  • allanallan Posts: 61,773Questions: 1Answers: 10,112 Site admin

    I don't appear to have received it yet if you have sent it already?

    Thanks,
    Allan

  • jfrjfr Posts: 71Questions: 24Answers: 0

    Hi Allan
    I just resended it
    Thanks

  • allanallan Posts: 61,773Questions: 1Answers: 10,112 Site admin

    Weird. I still don't have it I'm afraid. Could you send me the information by a private message instead please?

    Allan

This discussion has been closed.