Datatables, jEditable and MVC C# server creates invisible table

Datatables, jEditable and MVC C# server creates invisible table

f_strandnerf_strandner Posts: 1Questions: 0Answers: 0
edited December 2013 in DataTables 1.9
Hello everyone.

I've been trying to implement a editable table and for one minor detail everything works fine. When I edit the value of a cell I get a new hidden table underneath the table that was edited. This table seems to contain only one row, the last row of the "real" table. This of course results in a web page that grows a little bit for every edit you do.
At first I thought it was something wrong with my JavaScript code but I then replaced all my client side code (both JavaScript and html) with the one found here:
[quote]
http://www.datatables.net/release-datatables/examples/api/editable.html
[/quote]

I should probably also mentioned that I did replace the url in the example to /Some/Url
and that I'm using N2CMS. Don't know if the last bit is relevant, but if it is I've mentioned it...

As long as I return an empty string from my server it works in that I don't get the extra hidden table. I also of course get empty cell i my table.
When I return a non-empty string I get this strange behavior with the extra table and the text returned ends up in the edited cell.

this code gives the hidden table:
[code]
public string EditTable2(int? id, int? row_id, string value, int? column)
{
return value;
}
[/code]

whereas this doesn't

[code]
public string EditTable2(int? id, int? row_id, string value, int? column)
{
return "";
}
[/code]

I took a look at the response sent from the server, with the help of Firebug and DragonFly, in the example linked above and tried to make my response look the same by doing this:

[code]
public string EditTable2(int? id, int? row_id, string value, int? column)
{
return value + " (server updated)";
}
[/code]

but all that did was to give me some extra text in the table cell. The extra table remained.

Oh, one more thing. This happens in Firefox, Opera/Presto, Opera/Chrome, Google Chrome and Internet Explorer 11.

All this points to there is something wrong with my response from the server and obviously I'm missing something but I just can't figure it out. Is there any one who knows what I'm doing wrong?

About the notice for a link to a page showing the problem. I can't put one here, you need an user account to access it, but if you are reading this Alan I can e-mail you the information if you wish.

Any help very much appreciated!

/Fredrik
This discussion has been closed.