How can I active inline editor in responsive integration when the value is null?

How can I active inline editor in responsive integration when the value is null?

rrzavaletarrzavaleta Posts: 78Questions: 52Answers: 2

In the example: https://editor.datatables.net/examples/inline-editing/responsive.html

When the table is responsive and exists a null value, how can I active the inline editor?

Thanks for your help.

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    I'm afraid I don't quite understand what you mean by "exists a null value"? Do you mean that if there is a null there is no way to click the field? If so, I think you might need to use something like:

    td.child ul li span.dtr-data {
      display: inline-block;
      min-width: 50px;
    }
    

    Allan

  • rrzavaletarrzavaleta Posts: 78Questions: 52Answers: 2

    Yeah I mean that if there is a null there is no way to click the field.

    I did what you suggested but it doesn´t work :-(

    Is there another way?

  • rrzavaletarrzavaleta Posts: 78Questions: 52Answers: 2

    I want to divide in two variables

    allan hello, as I can get the values of the DRT classes (title and data) ?, I am using the following example to get the values without result. I am using the example of inline editor Responsive

    $('#example').on( 'click', 'tbody span', function (e) {

    var title=$(this).find('tbody span.dtr-data');
    var data=$(this).find('tbody span.dtr-title');

    });

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin

    I'm afraid I don't understand your second question. You want to get the data from the responsive elements? If so, use the cell().data() method on them and pass in the li element.

    Regarding your first question - if it didn't work, can you give mea link to the page so I can take a look and see why not please.

    Allan

This discussion has been closed.