Empty Cell Display "Click to edit"

Empty Cell Display "Click to edit"

rwzhaorwzhao Posts: 2Questions: 0Answers: 0
edited May 2010 in General
Hello All,

I use DataTables for dynamic table from a MySql table. Everything is displayed fine except the empty cell which display as "Click to edit". Is there anyway not to display this but just a empty cell?

Thanks.

Replies

  • rwzhaorwzhao Posts: 2Questions: 0Answers: 0
    I am using it with Jeditable plugin.
  • leokormaleokorma Posts: 7Questions: 0Answers: 0
    Hi,
    I have seen this post when i was searching for some other problem and I noticed it is a bit old, but I had same problem time ago and i can answer how to help this.

    Jeditable has a parameter called 'placeholder' and you can set with any text you want to show when cell is empty.

    A simple example can be this one:

    $('td', oTable.fnGetNodes()).editable(function(value, settings) {
    return(value);
    }, {
    placeholder : ' '
    });

    So it will show empty when cell is empty.
    Hope it helps.
    Regards.
  • leokormaleokorma Posts: 7Questions: 0Answers: 0
    Im sorry. Actually I was trying to write   but it went like empty... so the example would be like this:

    $('td', oTable.fnGetNodes()).editable(function(value, settings) {
    return(value);
    }, {
    placeholder : '  '
    });
This discussion has been closed.