DataTables Not Reloading with Ajax call
DataTables Not Reloading with Ajax call
Sindhuri
Posts: 3Questions: 0Answers: 0
I have a situation where on selection of value from a drop down the content table to be fetched. For first selection its loads the data properly but after that if i select another element then the function is being called and alert is also coming but datatable is not fetching the data again.
function selectCountry(Country)
{
ctry = Country.value;
window.alert(Country.value);
$("#SellOut").dataTable({
"sPaginationType": "full_numbers",
"sAjaxSource" : 'dataentryconfig/FetchConfigTable.html?Country='+Country.value,
"bJQueryUI": true,
"sAjaxDataProp" : 'sellout',
"aoColumns" : [ { mDataProp : 'fieldId' , "fnRender": function ( oObj ) {
if(oObj.aData["fieldId"]!=null){
return '';
}
} },{ mDataProp : 'displayTitle' , "fnRender": function ( oObj ) {
if(oObj.aData["displayTitle"]!=null){
return '';
}
} }, { mDataProp : 'mandatory' , "fnRender": function ( oObj ) {
if(oObj.aData["mandatory"]=='Y'){
return ' ';
}
else {
return ' ';
}
} } ,{ mDataProp : 'configId' , "fnRender": function ( oObj ) {
if(oObj.aData["configId"]!=null){
return '';
} else {
return ' ';
}
} }, { mDataProp : 'inputMandatory', "fnRender": function ( oObj ) {
if(oObj.aData["inputMandatory"]=='Y'){
return ' ';
}
else {
return ' ';
}
} } , { mDataProp : 'visible' , "fnRender": function ( oObj ) {
if(oObj.aData["visible"]=='Y'){
return ' ';
}
else{
return ' ';
}
} } ,{ mDataProp : 'defaultValue', "fnRender": function ( oObj ) {
if(oObj.aData["defaultValue"]!=null){
return ' ';
}
else {
return ' ';
}
} } , { mDataProp : 'ctryTitle' ,"fnRender": function ( oObj ) {
if(oObj.aData["ctryTitle"]!=null){
return ' ';
}
else {
return ' ';
}
} } ],
"bRetrieve" : true,
"bDestroy" : true
});
Please help
function selectCountry(Country)
{
ctry = Country.value;
window.alert(Country.value);
$("#SellOut").dataTable({
"sPaginationType": "full_numbers",
"sAjaxSource" : 'dataentryconfig/FetchConfigTable.html?Country='+Country.value,
"bJQueryUI": true,
"sAjaxDataProp" : 'sellout',
"aoColumns" : [ { mDataProp : 'fieldId' , "fnRender": function ( oObj ) {
if(oObj.aData["fieldId"]!=null){
return '';
}
} },{ mDataProp : 'displayTitle' , "fnRender": function ( oObj ) {
if(oObj.aData["displayTitle"]!=null){
return '';
}
} }, { mDataProp : 'mandatory' , "fnRender": function ( oObj ) {
if(oObj.aData["mandatory"]=='Y'){
return ' ';
}
else {
return ' ';
}
} } ,{ mDataProp : 'configId' , "fnRender": function ( oObj ) {
if(oObj.aData["configId"]!=null){
return '';
} else {
return ' ';
}
} }, { mDataProp : 'inputMandatory', "fnRender": function ( oObj ) {
if(oObj.aData["inputMandatory"]=='Y'){
return ' ';
}
else {
return ' ';
}
} } , { mDataProp : 'visible' , "fnRender": function ( oObj ) {
if(oObj.aData["visible"]=='Y'){
return ' ';
}
else{
return ' ';
}
} } ,{ mDataProp : 'defaultValue', "fnRender": function ( oObj ) {
if(oObj.aData["defaultValue"]!=null){
return ' ';
}
else {
return ' ';
}
} } , { mDataProp : 'ctryTitle' ,"fnRender": function ( oObj ) {
if(oObj.aData["ctryTitle"]!=null){
return ' ';
}
else {
return ' ';
}
} } ],
"bRetrieve" : true,
"bDestroy" : true
});
Please help
This discussion has been closed.