input boxes in place of data

input boxes in place of data

DelmaeDelmae Posts: 1Questions: 0Answers: 0
edited March 2013 in General
I'm relatively new to datatables, it being the already-existing technology used on a website I've inherited. I have to say--I LOVE IT! It has been fun and relatively easy to use and I'm eager to use it on more.

I've run in to an issue where I'd like several of the columns of data to appear as input boxes (text and checkboxes). I've searched through the forums and examples over the last 3 days and I've not been able to get a solution. To facilitate (and as a requirement) I've created several basic examples to show where I'm stuck.

I start out with the basic, working example, without the input boxes: http://live.datatables.net/ekehib/4/edit#javascript,live

This example works exactly as I want it to, with the first three columns being hidden and instead being displaying as a group header. The groups change when the value of the "ID" column (the last one on the right) change.

Then I make the data in the first two visible columns ("Sales #" and "Sales Date") show up in a textbox: http://live.datatables.net/ulihoc/3/edit#javascript,live

This appears to work correctly as well.

The problem is when I get to the final column ("ID"), where I would like to make it a checkbox: http://live.datatables.net/ulihoc/7/edit#javascript,live

What it looks like to me is that when the "ID" field's "fnRender" function gets the value for the "SalesNumber" value it loads the *rendered* value for the "SalesNumber" column instead of the underlying value. And although it doesn't show in this simple example, this unexpected (though not necessarily incorrect) behavior has carried over to the ID field when I put in the code to render a checkbox and messes up the grouping.

Note that in the live code that I'm working on the data is server side and works just fine--exactly as this simple example does.

Given this, I have the following questions:
1. Is there a better way to be rendering the input boxes? Although I like the JEditor plugin functionality, for the current task ALL of the values in the table need to be input boxes (not just the one you click on).
2. Is there a different underlying object I can check for the true data values--the ones unaltered by the rendering method?
3. (off topic) The following type of error keeps displaying in the red "Warning" section:

var ID = oObj.aData["ID"]; --- ['ID'] is better written in dot notation.

I've tried several variations of dot notation, but I can't quite seem to make it happy. How should this line be coded to function correctly and not show this warning?

I realize that everyone is busy. Whatever time you can give to this is greatly appreciated!

Thanks!
This discussion has been closed.