Documentation of after initialization JS access to methods.

Documentation of after initialization JS access to methods.

Steve_WebtronSteve_Webtron Posts: 19Questions: 0Answers: 0
edited January 2014 in General
I know documentation is a tremendous effort,
perhaps you could allow the community to post comments or examples on some of the documentation pages.

Mainly what I would love to see is...
If you can access some property or method through JavaScript, after the dataTable exists...
ie: http://datatables.net/forums/discussion/9331/can-i-reset-aocolumns-after-initialization-of-datatable-/p1
The answer was no,
But some other times, maybe we can.

it would be helpful to see an initialization way to set something up
and a javascript way to modify it after the fact. Especially with CRUD.

Thanks!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > perhaps you could allow the community to post comments or examples on some of the documentation pages.

    Funnily enough I've just completed exactly that this morning :-). The site is going to get a huge upgrade for 1.10, and I hope to post a beta and the new site very soon.

    > The answer was no,

    The answer is still no I'm afraid. This is the documentation for the error of "cannot reinitialise table" for the new site: https://github.com/DataTables/DataTablesSrc/blob/master/site/manual/tech-notes/3.xml . Its unformatted obviously, but it should be quite readable!

    Basically initialisation variables are only settable at initialisation time. The table can be destroyed and recreated with new options if needed (although there is an obvious performance penalty). Adding the ability to change initialisation variables would require a lot of additional code in DataTables (I hate to think how complicated it would be to change from scrolling to non-scrolling for example).

    Regards,
    Allan
  • Steve_WebtronSteve_Webtron Posts: 19Questions: 0Answers: 0
    edited January 2014
    Mmmmm Great!

    Perhaps people can note on each thing that says that they are initialization only options, or if they are available through oSettings or some other method/property.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    They will be documented as initialisation options. Those which have relevant public API methods (length changing for example) will have a "related" link pointing to the appropriate API method. Those that don't will obviously just be initialisation options.

    > if they are available through oSettings

    The settings object is considered to be private and not a public API.

    Allan
This discussion has been closed.