Configure ajax.dataSrc option other then during instantiation

Configure ajax.dataSrc option other then during instantiation

QzCuriousQzCurious Posts: 2Questions: 0Answers: 0

So, is there a way to configure ajax.dataSrc other then during instantiation?
A setter api ajax.dataSrc(string_dataSrc) would be sweet!

Replies

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Hi @QzCurious ,

    ajax.dataSrc can be a function, see the last example, so you can fine tailor it in there.

    Cheers,

    Colin

  • QzCuriousQzCurious Posts: 2Questions: 0Answers: 0

    @conlin
    I need it be configured after instantiation. Sometime my ajax.url changed, and I need ajax.dataSrc be changed too!

  • colincolin Posts: 15,118Questions: 1Answers: 2,583

    Yep, as I said, if you make it a function, you can do whatever logic you want in it.

This discussion has been closed.