Add row of dhtmlxGrid with text box issue.

I’m trying to add row from text box value what I write.


myForm.attachEvent(“onButtonClick”, function (name) {
if (name == “btnSave”) {
var name = myText.getItemValue(“name”, true);
var position = myText.getItemValue(“position”, true);

myGrid.addRow(myGrid.uid(), [name,position],"");

In this code, I can make row with name, position cells.
But because of using ‘cntr’ in setColTypes,
row input different from I intended.

[ name, position, (blank) ]

What I want
[ (auto create), name, position ]

Unfortunately you will have to use:
myGrid.addRow(myGrid.uid(), [,name,position],"");
so the value for the first cell will be reserved