Hi,
When I use splitAt() the grid don’t init.
I tried to find why, but with no results :
Here is my grid :
[code]
inv_grid = cellinv.attachGrid();
inv_grid.setImagePath(’/tools/dhtmlx_pro_full_terrace_skin/imgs/’);
inv_grid.setHeader([
"<div style='display:none'>0</div>SID STOCK",
"<div style='display:none'>1</div>SID MAGASIN",
"<div style='display:none'>2</div>SID INVENTAIRE",
"<div style='display:none'>3</div>SID ARTICLE REFERENCE",
"<div style='display:none'>4</div>SID FOURNISSEUR",
"<div style='display:none'>5</div>Référence",
"<div style='display:none'>6</div>Désignation",
"<div style='display:none'>7</div>Famille",
"<div style='display:none'>8</div>Emplacement",
"<div style='display:none'>9</div>Qté disponible",
"<div style='display:none'>10</div>Prix unitaire",
"<div style='display:none'>11</div>Qté minimun",
"<div style='display:none'>12</div>Qté alerte",
"<div style='display:none'>13</div>Qté maximun",
"<div style='display:none'>14</div>Conditionnement",
"<div style='display:none'>15</div>Unité de sortie",
"<div style='display:none'>16</div>Fournisseur",
"<div style='display:none'>17</div>Fabricant",
"<div style='display:none'>18</div>N° Lot ",
"<div style='display:none'>19</div>N° Série",
"<div style='display:none'>20</div>Dt réception",
"<div style='display:none'>21</div>Dt péremption",
"<div style='display:none'>22</div>Dt fin garantie",
"<div style='display:none'>23</div>Certificat",
"<div style='display:none'>24</div>Code Barre",
"<div style='display:none'>25</div>Etat",
"<div style='display:none'>26</div>is red zone",
"<div style='display:none'>27</div>is orange zone"
],
null,
[
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;",
"font-size:10px;"
]);
inv_grid.setColAlign("left,left,left,left,left,left,left,left,left,right,right,right,right,right,left,right,left,left,left,left,center,center,center,left,left,left,left,left,left");
inv_grid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,edn,ron,ron,ron,ron,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
inv_grid.setColSorting("str,str,str,str,str,str,str,str,str,int,int,int,int,int,str,int,str,str,str,str,date_custom,date_custom,date_custom,str,str,str,str,str,str");
inv_grid.setInitWidths("0,0,0,0,0,75,190,170,120,65,60,60,60,60,110,60,0,100,70,90,90,90,55,75,55,0,0,0");
inv_grid.setColumnsVisibility("true,true,true,true,true,false,false,false,false,false,false,false,false,false,false,false,true,false,false,false,false,false,false,false,false,true,true,true");
inv_grid.enableStableSorting(true);
inv_grid.enableColumnMove(true);
inv_grid.enableEditEvents(true,true,false);
inv_grid.enableDistributedParsing(true,50,1);
inv_grid.enableRowsHover(true,'grid_hover');
inv_grid.setDateFormat('%d[SXSVAR.DECIMAL_SEPARATOR]%m[SXSVAR.DECIMAL_SEPARATOR]%Y');
inv_grid.setNumberFormat("0.00",9,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",10,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",11,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",12,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",13,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",14,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",15,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.setNumberFormat("0.00",17,"[SXSVAR.DECIMAL_SEPARATOR]","[SXSVAR.DECIMAL_SEPARATOR]");
inv_grid.init();
s="...select...";
s="http://...&SQL="+encodeURIComponent(s);
loader = dhtmlxAjax.getSync(s);
s=loader.xmlDoc.responseText;
if (s.substring(0,5)=='Error') {
alert(s);
} else {
var res = new Array();
res = eval(s);
inv_grid.parse(res, "jsarray");
inv_grid.attachHeader([
"",
"",
"",
"",
"",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#select_filter",
"#text_filter",
"#select_filter",
"#select_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"#text_filter",
"",
"",
""
]);
inv_grid.splitAt(7);
inv_grid.selectRow(0,true,true,true);
}[/code]
I tryed without attachHeader and still have the problem…
Have you got any idea please?
thanks,
Loïc