Sunday, March 9, 2008

Nasty Sys.Preview.Data.DataTable bug in the PreviewScript.js

This is based on the December CTP scripts I believe:

Original code:

Sys.Preview.Data.DataTable = function Sys$Preview$Data$DataTable(columns, tableArray) {
            this._array = Array.isInstanceOfType(tableArray) ? tableArray : [];
    this._columns = Array.isInstanceOfType(columns) ? columns : [];
    this._rows = [];

Which is not setting actually the _rows, which leads to numerous problems during data binding ASP.NET Futures databinding. Correction would be:

Sys.Preview.Data.DataTable = function Sys$Preview$Data$DataTable(columns, tableArray) {
            this._array = Array.isInstanceOfType(tableArray) ? tableArray : [];
    this._columns = Array.isInstanceOfType(columns) ? columns : [];
    this._rows = Array.isInstanceOfType(tableArray) ? tableArray : [];

Post a Comment