disable bubble on specific rows

disable bubble on specific rows

nico077nico077 Posts: 55Questions: 14Answers: 2

Hello,

I want to disable row when data = 0 for example.

waiting for your reply,
Nicolas

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin
    edited April 2016

    I would suggest you add a check into the code where you call bubble() to check if there is any data in the table. The page.info() method will tell you that piece of information.

    Allan

  • nico077nico077 Posts: 55Questions: 14Answers: 2

    The page info() is a 404 - Page not found ^^

    Thanks for your reply

  • nico077nico077 Posts: 55Questions: 14Answers: 2

    I find on Google !

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin

    Sorry - corrected my API now.

    Allan

  • nico077nico077 Posts: 55Questions: 14Answers: 2

    Hello Allan,

    I don't think page.info() can help me.

    I only want to disable the bubble but the users can see this row (They can't change the values of the row).

    The example : https://editor.datatables.net/examples/bubble-editing/options.html
    But i want to affect the rows...

    Thank you very much for your quick responses

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin

    this row

    Which row?

  • nico077nico077 Posts: 55Questions: 14Answers: 2

    If we take the example :
    https://editor.datatables.net/examples/bubble-editing/options.html

    I want to disable the bubble on the row where office is equal to tokyo ?
    But the bubble works when office is different of tokyo ...

  • allanallan Posts: 63,096Questions: 1Answers: 10,390 Site admin
    Answer ✓

    Use row().data() to check if the row's data. Use a simple if condition before calling the bubble() method and check if it Tokyo or not.

    Allan

  • nico077nico077 Posts: 55Questions: 14Answers: 2

    Thank you Allan,

    It works.

This discussion has been closed.