Quantcast
Viewing all articles
Browse latest Browse all 82127

oSettings.aoColumns[i] is undefined

Hello everyone, I have changed my development environment , and have migrated my work over to my server. I've already had many issues with my REST web-service which i have hopefully fixed. In any case, This was created using datatables 1.9.1 and jquery-ui 1.8.2. I am now using datatables 1.9.4 and jquery-ui 1.9.2. And this is the error im getting (it get triggered when you edit a row)

TypeError: oSettings.aoColumns[i] is undefined
[Break On This Error] 	

var col_id = oSettings.aoColumns[i].sTitle;

please take a look at it. all the code is available under the source HTML, however for easy access here is my code:

          //Sets Selected Row
          var SelectedRow = fnGetSelected(oTable);

          if(SelectedRow.length !== 0 ) {
            var col_name = [];
            var row_sel = oTable.fnGetData(SelectedRow[0]);
            var oSettings = oTable.fnSettings();
            console.log(oSettings.aoColumns);
            
            //Grabs Column Names
            for(var i=0; i<row_sel.length; i++)
            {
              var col_id = oSettings.aoColumns[i].sTitle;
              col_name.push(col_id);
            }
            //Populates editRow with Selected Row Contents
            for(var i=0; i<col_name.length; i++)
            {
              $("#editRow input[name="+col_name[i].toLowerCase()+"]").val(row_sel[i]);
            }


site: http://www.jareddlc.com/db/index.html

Viewing all articles
Browse latest Browse all 82127

Trending Articles