the attachGrid() can not add row in the tabbar

Hi,

I have the tabbar and attachGrid , it can load the data but can not add row.
please help.

var dhxGrid = tabbar.cells(“a1”).attachGrid();
dhxGrid.setImagePath(“dht/grid/codebase/imgs/”);
dhxGrid.setSkin(“dhx_skyblue”);
dhxGrid.loadXML(“lib/get_admin_group.php”);
var dp = new dataProcessor(“admin_group_connector.php”);
dp.init(dhxGrid);

dhxGrid.attachFooter("   ,#cspan,#cspan,#cspan,#cspan");

Please provide the code of add_row function

hi Stanislav,

the add_row function as below.

function add_row(){
var id=dhxGrid.uid();
dhxGrid.addRow(id,’’,0);
dhxGrid.showRow(id);
}

Hi,

Could you any answer to me.

thank you.

Best Regards,
Kenenth

Unfortunately the issue cannot be reconstructed locally.
Your code works well for us.
If issue still occurs - please, provide a more detailed sample of your code or a complete demo where your issue can be reconstructed.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/doku.php?id=othe … leted_demo

hi sir,

here is the live demo. please help.

thank you.

best regards,
kenneth
sample.zip (394 KB)

Hi ,

Have you any answer come to me.
thanks

Best Regards,
Kenneth

Your code works well for us, except that

in attachFooter you call add_row1 function, but the real name of the function is add_row,

in add_row function you call:
dhxGrid.addRow(id,’,1,’,0);
but your grid is dhxGrid1:
var dhxGrid1 = tabbar.cells(“a1”).attachGrid();

Hi,

I find the error mgs is ‘dhxGrid’ is null or is not a object in the ie8.
the error code line is :

function add_row(){
var id=dhxGrid.uid();
dhxGrid.addRow(id,’,1,0900-1845’,0);
dhxGrid.showRow(id);
}

please help.
thank you

kenneth

Unfortunately the issue still cannot be reconstructed.
the adding of the row works well in IE8 for us in your demo.

hi ,

this is the new life demo to show it can’t add row. please find the attachment as below.
many thanks.

thank you.
demo.zip (818 KB)

Hi,

Could you any answer come to me.

Thank you.

In your html “dhxGrid” is a local variable of administration() function.

I don’t know how to modify the code. Could you give me suggestion?

Please, try to remove “var” from the string:

var dhxGrid = tabbar.cells(array_num[0]).attachGrid(); 

in administration() function.

thank you very much.