hi
i am using professional edition of dhtmlx .I am working on ruby on rails platform.I need the combo of my grid to fetch data from database and display as a list.and it needs to be done in all the rows .So in rxml how to load the data to the combo box for the corresponding row .please help me its urgent.
You can use:
combo = grid.getColumnCombo(columnIndex);
combo.loadXML(“data.xml”);
Tutorial is available here docs.dhtmlx.com/doku.php?id=dhtm … cell_combo
Hi this is the grid code where in which i need a combobox ,i tried as u told, but its not working still!!!
Please look at the code and help me.
Grid javascript code in my emp.rhtml file
And my data1.rxml file is as below
xml.instruct! ml, :version=>“1.0”
xml.tag!(“rows”) do
@empdata.each do |empdet|
xml.tag!(“row”,{ “id” => empdet.id }) do
xml.tag!(“cell”, empdet.empid )
xml.tag!(“cell”, empdet.empprojlist)
xml.tag!(“cell”, empdet.empaddr)
end
end
end
And my emplists.rxml file is as below
xml.instruct! ml, :version=>“1.0”
xml.tag!(“rows”) do
@empprojectlist.each do |empproj|
xml.tag!(“row”,{ “id” => empproj.id }) do
xml.tag!(“cell”, empproj.empprojlist)
end
end
end
As per the above code i am getting my grid and the data1.rxml value loaded in it.
and in that javascript file i created the combo object.and i am trying to load the emplists.rxml data into the combo of the grid in the column “1”.you can see that in the above JavaScript code. But the value is not loaded into the combo.And the javascript file i have included is dhtmlx.js and dhtmlx.css its taken from the dhtmlx_pro_full file Please help me out of this. Its very urgent .Any suggestions are welcome.
Thanks
Please try to following order of commands:
grid.loadXML("/admin/data1",function(){
co = grid.getColumnCombo(1);
co.loadXML("/admin/emplists");
});
I tried what you told
data1.rxml is getting loaded into the grid but not the emplists.rxml into the combo.Is that emplists.rxml file defined is correct.
And is there any javascript file dependency is there Because the instance for “co” the combo object is not getting created.And i am using dhtmlx.js and dhtmlx.css from dhtmlx_pro_full file.Please help me out.