Problem Dynamically Generating DataTable Columns

Hello, I am trying to dynamically generate a DataTable whose columns are determined by a cookie and whose values are determined by XML pulled from an XHR. I am looping over the values from the cookie to determine the fields for the responseSchema for the DataSource, then looping over the resulting array of responseSchema.fields to create column definititions for the DataTable. There are also two keys that are always present, irrespective of the data, "id" and "name" that are handled outside of the loops for both responseSchema and and column definitions. These are added before and after the loop.

The problem is that only one element is created in the loop, the first item in the array, and then something is failing without error when attempting to create the subsequent column definitions from the array. Relevant code and the YUI logger output are here: http://www.pastie.org/367296. Sample XML is here: http://www.pastie.org/367319.

I've been beating my head against this for hours. Anybody have any ideas?


1 Reply

Recent Posts

in General Discussion at YDN