Hi all,
I used the tabbar to attach a grid, but it can not add row or delete row.
In case of a single grid, it can add row or delete row.
please help, many thanks.
tabbar = dhxLayout.cells(“b”).attachTabbar();
tabbar.setImagePath(“dht/tabbar/codebase/imgs/”);
tabbar.setSkin(“dhx_skyblue”);
tabbar.addTab(“a1”,“May”,“100px”);
tabbar.addTab(“a2”,“Jun”,“100px”);
tabbar.setTabActive(“a1”);
var dhxGrid = tabbar.cells(“a1”).attachGrid();
dhxGrid.setImagePath(“dht/grid/codebase/imgs/”)
dhxGrid.loadXML(“lib/get_away_from_office.php”);
var dp = new dataProcessor(“away_from_office_connector.php”);
dp.init(dhxGrid);
dhxGrid.attachFooter("<center><input type='button' name='add' id='add' value='add row' onclick='[b]add_row()[/b]'>,<input type='button' name='delete' id='delete' value='delete row' onclick='dhxGrid.deleteSelectedRows()'></center>");
function add_row(){
var id=dhxGrid.uid();
dhxGrid.addRow(id,’’,0);
dhxGrid.showRow(id);
}