Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Seetharaman Srinivasan on Oct 21, 2008 07:31
open dhtmlx forum
dhxLayout

I created a 1C layout and displayed a grid mygrid3. I want to do print preview from menu. My menu looks okay and when I click on the selection from menu, I executed the dhxLayout.cells("a").mygrid3 command. Is this the right way to access the grid inside the layout?

dhxLayout.cells("a").mygrid3 is undefined
[Break on this error] dhxLayout.cells("a").mygrid3.printView();
Answer posted by Support on Oct 21, 2008 07:36
Try this:

var mygrid3 = dhxLayout.cells("a").attachGrid();
....
mygrid3.printView();
Answer posted by Seetharaman Srinivasan on Oct 21, 2008 07:47
This time, it opened another tab and the other tab had a blank screen .
Also the original page with dhxLayout is set to blank with the top menu only

Answer posted by Support on Oct 21, 2008 08:59
printView() generates the new window ( which may be a new tab in FF ) with print preview.
If grid was empty on moment of printView execution - it may result in empty screen shown.