Is the Fieldtype Checkbox only available in the Editor

Is the Fieldtype Checkbox only available in the Editor

the_Drewsterthe_Drewster Posts: 4Questions: 1Answers: 0

Hi there

First time poster. Have been using bootstrapTable fairly extensively but I may have to rewrite my app as there is no ability to save the state of the who's selected checkboxes on refresh.

I notice that DataTables can SaveState, which is great, but cannot seem to find the Checkbox FieldType. Is this only a feature of the paid for Editor version? I don't need to edit my rows at all, just need users to be able to select rows.

Thanks

Drew

Answers

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin

    Hi,

    I'm afraid I don't really understand how the checkbox input type in Editor relates to state saving in DataTables core. Could you clarify that?

    If you need row selection, take a look at TableTools which provides row selection options (which is what Editor uses).

    Allan

  • the_Drewsterthe_Drewster Posts: 4Questions: 1Answers: 0

    Thanks for replying Allan. I didn't explain that very well. I notice that in Editor, one can select checkboxes and if state saving is set to true, the selections are remembered. I would like to utilise this, however I cannot see the option for Checkboxes out of the box at all in DataTable, only in Editor. Can you tell me if this is true?

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin

    Do you mean like in this example (if it had state saving enabled)? State saved row selection is not something that TableTools currently does. I'm not sure where you would have seen an example of that. Can you link to the page please?

    Allan

  • the_Drewsterthe_Drewster Posts: 4Questions: 1Answers: 0

    Here is Allan. If you check some boxes and refresh the page, it remembers your selection.

    https://editor.datatables.net/examples/api/checkbox.html

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin

    Ah I see. That isn't state saving - that is Editor writing the new value to the database. Therefore when you reload it shows your selected value because that is what is what the data values are from the database!

    Allan

  • the_Drewsterthe_Drewster Posts: 4Questions: 1Answers: 0

    Oh!!!! I see. Okay, thanks for the explanation. That's solved me a lot of time wasting.

This discussion has been closed.