Hello
Based on mentioned sample works fine (tested in v.4.3). Scroll appears automatically. Screenshot and code are attached. (grid sample based on 16_rows_columns_manipulations/01_addrows_grid.html)
HTML page source is below:
[code]
DHTMLX test
html,body { width: 100%; height: 100%; margin: 0; }
var myForm,
formData,
grid;
function doOnLoad()
{
formData = [{
type: "settings",
labelWidth: 130,
inputWidth: 170
}, {
type: "input",
name: "input1",
label: "Full Name",
value: "Kaapori Lumikaastra"
}, {
type: "input",
label: "Email",
value: "kaapori.lumi@gmail.com"
}, {
type: "container",
name: "myGrid",
label: "Select Product",
inputWidth: 370,
inputHeight: 350
}, {
type: "button",
name: "plusButton",
value: "Add Row to the end"
}];
dhxWins = new dhtmlXWindows();
dhxWins.attachViewportTo(document.body);
w1 = dhxWins.createWindow("w1", 0, 0, 600, 600);
tabbar = w1.attachTabbar();
tabbar.addTab("a1", "Tab 1-1", "180px");
tabbar.addTab("a2", "Tab 1-2", "180px");
tabbar.tabs("a1").setActive();
myForm = tabbar.tabs("a1").attachForm(formData);
myForm.attachEvent("onButtonClick", function(name){
add_r()
});
myGrid = new dhtmlXGridObject(myForm.getContainer("myGrid"));
myGrid.setImagePath("../dhtmlxSuite_v43_pro/codebase/imgs/");
myGrid.setHeader("Column A, Column B");
myGrid.setInitWidths("100,250");
myGrid.setColAlign("right,left");
myGrid.setColTypes("ro,ed");
myGrid.setColSorting("str,str");
myGrid.init();
myGrid.loadXML("../dhtmlxSuite_v43_pro/samples/dhtmlxGrid/common/grid_16_rows_columns_manipulations.xml");
}
function add_r(){
var ind1=window.prompt('Value for the first cell','');
if (ind1 === null || typeof ind1 == "undefined") return;
var ind2=window.prompt('Value for the second cell','');
if (ind2 === null || typeof ind2 == "undefined") return;
//
myGrid.addRow(myGrid.uid(),[ind1,ind2],myGrid.getRowsNum()+1);
}
</script>
[/code]