Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mort Reddov on Feb 06, 2009 02:22
open dhtmlx forum
dhtmlxTreeGrid: kidsXmlFile parameter 'id' always appended with '?id='

In order to modify the url parameters for "treegrid.kidsXmlFile" at runtime, I do the following:

treeGrid.attachEvent("onDynXLS" , function (pos,count){
treeGrid.kidsXmlFile+="?app_id="+region;
treeGrid.kidsXmlFile+="&sla_report_sec_id="+down_system;
return true;
});

When the event is called, the 'id' parameter is always appended with a '?' in front of it. Generated URL looks like this:

.../childNodes.jsp?app_id=202&sla_report_seq_id=156?id=3588

When I try to add the id parameter myself (append '+"&id="+pos;' to the URL), the same thing happens:

.../childNodes.jsp?app_id=202&sla_report_seq_id=156&id=3588?id=3588


I am using dhtmlxtreegrid.js v.2.0 build 81107

Thanks for your support!
Answer posted by Support on Feb 06, 2009 04:48
Problem confirmed ( url check occurs before event call, so it use sign actual to original url, not to the updated one ) 
To fix issue you can 
a) contact us directly at support@dhtmlx.com to receive an updated file
b) change your code to the 

treeGrid.attachEvent("onDynXLS" , function (id){  //in case of treegrid
         treeGrid.kidsXmlFile+="?app_id="+region; 
         treeGrid.kidsXmlFile+="&sla_report_sec_id="+down_system; 
         treeGrid.load(treeGrid.kidsXmlFile+"&id="+id);
return false; 
});

Answer posted by Mort Reddov on Feb 06, 2009 08:00
Hey Support,

many thanks for your rapid response, your code runs like a charm!
I will ask for that updated file by tonight.

Thanks again,
Mort.