Problem with mDataProp dot notation on page load

Problem with mDataProp dot notation on page load

ThobiasThobias Posts: 4Questions: 0Answers: 0
edited September 2012 in General
Our site uses ASP.NET webforms and we load the datatables from the code behind like this:

[code]
foreach (Employer employer in db.GetAllEmployersForConfirmations())
{
TableRow tr = new TableRow();
TableCell employerId = new TableCell{Text = employer.Id.ToString()};
TableCell mailboxNumber = new TableCell {Text = employer.MailboxNumber.ToString()};
TableCell name = new TableCell {Text = employer.Name};
TableCell contact = new TableCell {Text = employer.MainContact.FullName};
TableCell date = new TableCell() { Text = employer.RegistrationDateString };
TableCell confirmed = new TableCell() {Text = employer.IsConfirmed.ToString()};
TableCell button = new TableCell();

tr.Controls.Add(employerId);
tr.Controls.Add(mailboxNumber);
tr.Controls.Add(name);
tr.Controls.Add(contact);
tr.Controls.Add(date);
tr.Controls.Add(confirmed);
tr.Controls.Add(button);

this.EmployersBodyTable.Controls.Add(tr);
}
[/code]

where the markup looks like this:

[code]



InstitutionID
Mailbox #
Employer
Contact
Registration Date
Confirmed







[/code]

There is a button on each row that preforms some action, after which a fnReloadAjax is called to refresh the changes in the table. That is why we need the mDataProp (defined by the data-table-data-prop attribute on each ) on each column.

The problem comes in on page load. Every page load, I get this error on two different rows: "DataTables warning (table id = 'EmployersTable'): Requested unknown parameter 'MainContact.FullName' from the data source for row 0". But when fnReloadAjax is called, there are no errors. If we change the mDataProp from "MainContact.FullName" to "MainContactFullName" (or anything without dot notation), there are no errors on page load, but the fnReloadAjax won't work (for obvious reasons). Does anyone know why we are getting this behaviour?
This discussion has been closed.