data table not auto refreshing after editing cell
data table not auto refreshing after editing cell
mrajaaries
Posts: 2Questions: 0Answers: 0
I have a datable defined in this way;
$(document).ready(function() {
var oTable;
oTable = $('#mytable').dataTable({
"bServerSide": false,
"bJQueryUI": true,
"bProcessing": true,
"sAjaxSource": 'interface_downtime_table.jsp',
aoColumns: [
{
sName: "TES_INTERFACE_ID",
"bVisible": false
},
{
sName: "TES_APP_ID",
},
{
sName: "TES_ENV",
},
{
sName: "TES_START_DATE"
},
{
sName: "TES_END_DATE"
},
{
sName: "TES_PLANNED_UNPLANNED"
},
{
sName: "TES_COMMUNICATIONID"
},
{
sName: "TES_REASON"
}
]
});
oTable.makeEditable({
sUpdateURL: "UpdateData.jsp",
}); });
Here I am populating the DataTable with values (JSON String) from the database. With this implementation I am able to edit the cell and value is also getting updated in the database. But in order to reflect the changes on the UI DataTable I have to refresh the page everytime. UpdateData.jsp returns the updated value.
$(document).ready(function() {
var oTable;
oTable = $('#mytable').dataTable({
"bServerSide": false,
"bJQueryUI": true,
"bProcessing": true,
"sAjaxSource": 'interface_downtime_table.jsp',
aoColumns: [
{
sName: "TES_INTERFACE_ID",
"bVisible": false
},
{
sName: "TES_APP_ID",
},
{
sName: "TES_ENV",
},
{
sName: "TES_START_DATE"
},
{
sName: "TES_END_DATE"
},
{
sName: "TES_PLANNED_UNPLANNED"
},
{
sName: "TES_COMMUNICATIONID"
},
{
sName: "TES_REASON"
}
]
});
oTable.makeEditable({
sUpdateURL: "UpdateData.jsp",
}); });
Here I am populating the DataTable with values (JSON String) from the database. With this implementation I am able to edit the cell and value is also getting updated in the database. But in order to reflect the changes on the UI DataTable I have to refresh the page everytime. UpdateData.jsp returns the updated value.
This discussion has been closed.
Replies
I referred while adding the editcell functionality and came up with this code
Allan