add the jEditable-Function only for one cell
add the jEditable-Function only for one cell
Hello. First, sorry for my bad English. Is it possible that adding the jEditable function of the DataTable to click in a cell just for this?
My problem is this: I have a table with 30 columns and 25 rows, and here the drawing in Internet Explorer takes a long time, since each cell is drawn for an editable field (700 times).
So I add the jEditable function to the table:
[code]
$('#example').dataTable().makeEditable(
sUpdateURL: function(value, settings)
{..},
"aoColumns": [
null, {}, …
])
[/code]
My problem is this: I have a table with 30 columns and 25 rows, and here the drawing in Internet Explorer takes a long time, since each cell is drawn for an editable field (700 times).
So I add the jEditable function to the table:
[code]
$('#example').dataTable().makeEditable(
sUpdateURL: function(value, settings)
{..},
"aoColumns": [
null, {}, …
])
[/code]
This discussion has been closed.
Replies
$(thatcell).editable();
please read http://www.appelsiini.net/projects/jeditable
thanks for the answer, but there is the same problem. When I check the application with the firebug, the function starting at line 108 in the file "jquery.jeditable.js" is called over 700 times.
That´s my code:
[code]
var oTable = $('#example').dataTable();
$('td', oTable.fnGetNodes()).editable();
[/code]
Do you have an example where this function is called only 1 time for the "clicked cell"?
[code]
$('#example tbody td').dblclick( function () {
var aPos = oTable.fnGetPosition( this );
var aColIndex = oTable.fnGetPosition(this)[2];
var aData = oTable.fnGetData( aPos[0] );
...
this.innerHTML = '';
...
var inputText = document.getElementById("editable");
inputText.onblur = function (){
this.outerHTML = inputText.value;
}
inputText.onkeydown = function(e) {
var e = e || window.event;
if (e.keyCode == 27) {
this.blur();
}
...
[/code]
$(selector).editable();