Problem with attachFooter and splitAt on V3 pro

Hi,

I’m experiencing problem using attachFooter and splitAt on V3 pro.

When i “splitAt”, the bottom scrollbar is not visible (so I can’t reach all the cols on the right of my table).

Here is my code :

myGrid = new dhtmlXGridObject('my_div');
		    	myGrid.setImagePath("/Common/Output/Javascript/dhtmlx_v3_pro/dhtmlxGrid/codebase/imgs/");
myGrid.setHeader("<?php echo $header;?>");
myGrid.setSkin("dhx_skyblue");
myGrid.setInitWidths("<?php echo $initWidth;?>");
    			myGrid.setColTypes("ro,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn,edn");
    			myGrid.setColAlign("left,right,right,right,right,right,right,right,right,right,right,right,right,right,right");
    			myGrid.setColSorting("str,str,str,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int");
    			myGrid.attachHeader("#select_filter,#text_filter,#text_filter,#text_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter,#numeric_filter");
myGrid.init();
    			myGrid.attachFooter("Total:,&nbsp;,&nbsp;,&nbsp;,#stat_total,#stat_total,#stat_total,#stat_total,#stat_total,#stat_total,#stat_total,#stat_total,#stat_total,#stat_total");
myGrid.splitAt(4);
myGrid.loadXMLString(xmlString);

Could you help me with that please ?

Up :wink:

UP please

Unfortunately your issue cannot be reconstructed. Your code works well for us.
If issue still occurs - please, open ticket at support@dhtmlx.com and provide a complete demo to reconstruct the issue.

I’m having the same problem with splitAt.

If there is no footer, it works great.

When the footer is added, the bottom scrollbar is not visible. Then when the window is resized, the bottom scrollbar appears.

I’m attaching the grid to a layout cell.

Also using pro v3.

Unfortunately the issue cannot be reconstructed.
Please, provide a complete demo to reconstruct the issue.

I can reproduce the problem. It’s strange, when I run the code locally form the web server everything is fine. When I run the code from my house which is 300 miles away from the web server, the problem exists. It’s a problem in IE,7,8,9, FF, Safari and Chrome

Also I found a work-around by running the report 2x during the initial grid load:

var firstInit = true
	
function runRpt() {
		var urlLoadGrid  = "xyz….private”
		a.progressOn();
		grid.clearAndLoad(urlLoadGrid);
	}

	grid.attachEvent("onXLE", function(grid_obj,count){
		a.progressOff();
		if (firstInit) {
			firstInit = false;
			runRpt();    //
		}
	 
	 });

All subsequent grid reloads work fine.

Can I email the code and a link which reproduces the problem? I want to keep my website out of site from forums.

I’ve just emailed the working demo to support.

Unfortunately your issue still cannot be reconstructed locally. (the files from post viewtopic.php?f=23&t=24544&p=77810 were used)
If issue still occurs for you - please, provide a complete demo with js files used in your project or a demo link, where the issue can be reconstructed.

Did you click the link in the email message to reproduce? It reproduces everytime.

Like I said before, the files work fine when run locally, when run from computer not connected to the same network it fails.

I think the problem has to do with page initialization and the speed at which the data is loaded.

To reproduce, either

  1. run the report by clicking the link in my email
    -or-
  2. put my files on a server and access from a computer from a different url

Look, I’m having the same problem as the originial author as this thread…the problem is real, I’m telling you how to reproduce it.

If issue still actual - when footer added to the grid after grid’s initialization it may occur that grid doesn’t resize to show it. To fix issue you can

a) move attachFooter before grid.init
or
b) call grid.setSizes() after attaching footer - which forces grid resizing, and must normalize scrolls.

I tired: grid.setSizes() in onXLE and it did not fix the problem. Still need to reload the grid the 1st time to make the bottom scroll bar appear.

We’ve tried to open your project locally or using the provided link and we still cannot find any issue with scrolling in your your grid. Please, have a look at the attached screenshot.
All columns are visible. Horizontal scrolling is not showing as there is no need in it.
After the expanding the width of the “Week total” column horizontal scrollbar successfully appears.
The similar behavior appears after resizing of the other columns or opening the project in the other browser (tested in IE,FF,Opera,Chrome).
Please, provide screenshots of the problem or clarify the expected behavior.

Can you please remove the photo’s in the links? This info is not meant for a public forum.

Can you please remove the photo’s of my website? I know what it looks like.

You need to make your browser window smaller so that that the you get a vertical scroll bar. Then you’ll notice the problem with the missing horizontal scroll bar is being covered by the footer.

Please, try to add setSizes() after the loading data in the grid:

grid.clearAndLoad(urlLoadGrid, function(){ grid.setSizes() });

This works:

grid.clearAndLoad(urlLoadGrid, function(){grid.setSizes()});

I’m finding a lot of use for splitAt() and this greatly helps.

Thanks for the great solution.

The other issue I’ve been seeing is in Chrome, the 2nd header is really really big, whereas in IE the 2nd header is the same size as the 1st header.

The splitAt() demo link shows the problem.

In your xml in the afterinit part you rename the title in the first column, also in the script part you call splitAt right after the init of the grid (it occurs before the loading of xml).
Please, try to split your grid after the column is renamed. You may call splitAtt right in your xml after the setting the title to the column:

[code]

0 DC 06/2012 2 [/code]

Changed the xml to:

<afterInit>
  <call command="setColLabel"><param>0</param><param>XXX</param></call>
  <call command="splitAt"><param>2</param></call>
</afterInit>

and then removed splitAt(2) in the js file.

The resutls are that grid splits, the header is blank for the 1st column. Also in Chrome the 2nd header is still oversized.

(Note you may need to clear cache in order to see it).