Unable to get value of the property 'oFeatures': object is null or undefined
Unable to get value of the property 'oFeatures': object is null or undefined
RMinas
Posts: 1Questions: 0Answers: 0
Hello,
I'm trying to refresh a table after updating it on the codebehind and despite every change I do I keep getting this error.
The codebehind is doing its job, after I return the partialview, it populates the table but nothing happens because I still haven't figured out how to solve this error. Can you please help me?
JScript
[code]
$(document).ready(function () {
var oEntityTable = $('#entityTable').dataTable({
"bFilter": false,
"bInfo": false,
"bJQueryUI": true,
"bServerSide": true,
"sAjaxSource": "SearchClients",
"sDom": '<"top">rt<"bottom"flp><"clear">'
});
});
$(document).ready(function () {
$('#btnSearchClients').click(OnBtnSearchClientsClick);
});
function OnBtnSearchClientsClick(e) {
$.ajax({
url: jqDataUserUrl.Url,
type: "POST",
cache: false,
success: function () {
$('#entityTable').dataTable().fnDraw();
},
error: function (xhr, ajaxOptions, thrownError) {
//TODO
}
});
return false;
}
[/code]
And in the codebehind I have something like this:
C#
[code]
public ActionResult SearchClients(FormCollection oForm)
{
var entity = new Entity();
entity.Results = new List().ToArray();
GetEntityListIn getEntityListIn = new GetEntityListIn();
//(...)
GetEntityListOut GetEntityListOut = client.GetEntityList(getEntityListIn);
if (GetEntityListOut != null)
{
entity.Results = GetEntityListOut.Entity;
ViewBag.Results = entity.Results;
return PartialView("AddClient", entity);
}
return PartialView("AddClient");
}
[/code]
What am I doing wrong?
I'm trying to refresh a table after updating it on the codebehind and despite every change I do I keep getting this error.
The codebehind is doing its job, after I return the partialview, it populates the table but nothing happens because I still haven't figured out how to solve this error. Can you please help me?
JScript
[code]
$(document).ready(function () {
var oEntityTable = $('#entityTable').dataTable({
"bFilter": false,
"bInfo": false,
"bJQueryUI": true,
"bServerSide": true,
"sAjaxSource": "SearchClients",
"sDom": '<"top">rt<"bottom"flp><"clear">'
});
});
$(document).ready(function () {
$('#btnSearchClients').click(OnBtnSearchClientsClick);
});
function OnBtnSearchClientsClick(e) {
$.ajax({
url: jqDataUserUrl.Url,
type: "POST",
cache: false,
success: function () {
$('#entityTable').dataTable().fnDraw();
},
error: function (xhr, ajaxOptions, thrownError) {
//TODO
}
});
return false;
}
[/code]
And in the codebehind I have something like this:
C#
[code]
public ActionResult SearchClients(FormCollection oForm)
{
var entity = new Entity();
entity.Results = new List().ToArray();
GetEntityListIn getEntityListIn = new GetEntityListIn();
//(...)
GetEntityListOut GetEntityListOut = client.GetEntityList(getEntityListIn);
if (GetEntityListOut != null)
{
entity.Results = GetEntityListOut.Entity;
ViewBag.Results = entity.Results;
return PartialView("AddClient", entity);
}
return PartialView("AddClient");
}
[/code]
What am I doing wrong?
This discussion has been closed.
Replies
Allan