xOliver
December 18, 2013, 12:45pm
#1
Hello
Example:
In my Grid are 8 columns (3 are hidden with ‘setColumnHidden’). The user got the option to reload page and show all 8 columns.
I tried
Grid[2].clearAll();
Grid[2].loadXML("../dhtmlx/Data/XML/grid.php?id=45&j=<?php echo $_GET['j']; ?>&s1="+ToolBar[2].getItemState("orders")+"&s2="+ToolBar[2].getItemState("termin"));
but this just reloads the Grid and the 3 hidden columns are not shown. I need an option to reload the “whole” Grid … not just the rows in the existing Grid.
Thank you
Best regards
Oliver
sematik
December 27, 2013, 2:57pm
#3
please, try to use:
grid.clearAll(true) // it clears the data and the header of the grid.
xOliver
December 30, 2013, 4:24pm
#4
If i write the following and try to reload grid kills the header, the grid and loads and loads and loads …
Grid[2].clearAll(true);
Grid[2].loadXML("../dhtmlx/Data/XML/grid.php?id=45&j=<?php echo $_GET['j']; ?>&s1="+ToolBar[2].getItemState("orders")+"&s2="+ToolBar[2].getItemState("termin"));
sematik
December 30, 2013, 5:05pm
#5
Is your header structure is included in the xml?
If you are clearing the header, you need to create it again before loading the data.
First … happy new year
Now a stupid question … how can i include header information in my xml ?
Happy New Year!
Forget it. Please, try to use the following code:
Grid[2].clearAll();
for(var i=0; i<Grid[2].getColumnsNum(); i++){
Grid[2].setColumnHidden(i,false)
}
Grid[2].loadXML("../dhtmlx/Data/XML/grid.php?id=45&j=<?php echo $_GET['j']; ?>&s1="+ToolBar[2].getItemState("orders")+"&s2="+ToolBar[2].getItemState("termin"));