Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael Ferrante on Jun 09, 2009 09:41
open dhtmlx forum
Split Mode Frozen Columns (splitAt) incompatible with enableAutoSaving / loadSizeFromCookie

We've tried using splitAt in combination with loadSizeFromCookie / enableAutoSaving and it causes the grid appearance to be messed up.

The documentation mention about "Split Mode" mentions that "this mode is incompatible with some grid functionality":

"Split Mode. Frozen Columns
You can activate split mode to have Grid(TreeGrid) separated into two parts with independent horizontal scrolling.
Important: we recommend using this mode with some performance optimization technologies (paginal output, smart rendering) taking into account complex script processing in split mode.
Important: this mode is incompatible with some grid functionlity."

1) Is it true that the splitAt() does not work with loadSizeFromCookie()?
2) Is there a work around for the issue, like maybe some way to save the sizes in custom javascript?
3) Is that something that might be fixed in the future?

Thank you,
Michael

===================================================
code sample: (compare with loadSizeFromCookie() on and loadSizeFromCookie() off)
===================================================

<html>
<head>
<title>Grid Test</title>
<link rel="stylesheet" type="text/css" href="/Content/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.css" />
<script type="text/javascript" src="/Content/dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script type="text/javascript" src="/Content/dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script type="text/javascript" src="/Content/dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>

<!-- for splitAt() function -->
<script type="text/javascript" src="/Content/dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_splt.js"></script>

<!-- for enableAutoSizeSaving() function -->
<script type="text/javascript" src="/Content/dhtmlx/dhtmlxGrid/codebase/ext/dhtmlxgrid_ssc.js"></script>

</head>
<body>

<script type="text/javascript">
var mygridData = "<?xml version=\"1.0\"?>"
mygridData += "<rows>";

mygridData += "<row id='1'>";
mygridData += "<cell>Name1</cell><cell>1</cell><cell>10.00</cell><cell>01/01/2008</cell><cell>A Very long description about what the text is about. Blah Blah Blah BlahBlah BlahBlah BlahBlah BlahBlah Blah</cell>";
mygridData += "</row>";

mygridData += "<row id='2'>";
mygridData += "<cell>Name2</cell><cell>2</cell><cell>11.23</cell><cell>02/01/2008</cell><cell>More Blah Blah A Very long description about what the text is about. Blah Blah Blah BlahBlah BlahBlah BlahBlah BlahBlah Blah</cell>";
mygridData += "</row>";

mygridData += "<row id='3'>";
mygridData += "<cell>Name3</cell><cell>3</cell><cell>11.23</cell><cell>02/01/2008</cell><cell>More Blah Blah A Very long description about what the text is about. Blah Blah Blah BlahBlah BlahBlah BlahBlah BlahBlah Blah</cell>";
mygridData += "</row>";

mygridData += "<row id='4'>";
mygridData += "<cell>Name4</cell><cell>4</cell><cell>11.23</cell><cell>02/01/2008</cell><cell>More Blah Blah A Very long description about what the text is about. Blah Blah Blah BlahBlah BlahBlah BlahBlah BlahBlah Blah</cell>";
mygridData += "</row>";

mygridData += "<row id='5'>";
mygridData += "<cell>Name5</cell><cell>5</cell><cell>11.23</cell><cell>02/01/2008</cell><cell>More Blah Blah A Very long description about what the text is about. Blah Blah Blah BlahBlah BlahBlah BlahBlah BlahBlah Blah</cell>";
mygridData += "</row>";

mygridData += "</rows>";
</script>

<div id="divGrid1" style="width: 500; height: 150" />

<script type="text/javascript">
var mygrid = new dhtmlXGridObject("divGrid1");
mygrid.setHeader("Name,ID,Dollar,Date,Description");
mygrid.setInitWidths("100,50,50,50,400");
mygrid.setColAlign("left,right,right,right,left");
mygrid.setColTypes("ed,ro,ed,ed,ed");
mygrid.setColSorting("str,int,int,str,str");

mygrid.enableAutoSaving();

mygrid.splitAt(2);

mygrid.init();

mygrid.loadXMLString(mygridData);
mygrid.loadSizeFromCookie();
</script>
</body>
</html>
Answer posted by dhxSupport on Jun 10, 2009 04:55
This bug was confirmed and fixes. Fixed file was send you by email