Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Using datatable with makeeditable, wrong row selection when selecting newely added row

$
0
0
Dear Allan,

I am using jquery.dataTables.editable.js(Version:1.3) along with datatable(version 1.9.4). m new to datatables.
In add new row form, i have add button, and update button(modified default delete button to edit and update selected row in same add new row form).
i have mapped my form columns to datatable columns using "rel" attribute.

when i add new record and save => it is immediatly appended in datatable( and in backend database).
but when i select same row data using below,

oTable.$('tr').click( function () {
aData = oTable.fnGetData(this); // get datarow
});

It returns me wrong row data and not the one selected.
if i refresh my page and reload datatable, => it gives me correct index for editing.

mainly i fetch selected row data and fill it in add new row form for editing. i am not using inline editing.

Can you suggest me workaround for this? how and where can i refresh datatables.
also if we have more then 1000 records with around 40 columns each, it is NO GOOD to reload entire datatable after add/update, as it takes time to load from server.

Could you please help me with your suggestion on this?

Viewing all articles
Browse latest Browse all 1816

Trending Articles