I have a problem in that I using the combo box in 5 location in my grid, each of these columns reference by an id a text value that I would like to display. See image 1 how it looks like after loading the page.
The data seems to be there, as when I start tabbing through the cells - it shows the right value in the drop down box. See image 2.
My code looks like this
// My Grid
mygrid = new dhtmlXGridObject('action');
// Set the path of where the images are located
mygrid.setImagePath("../third_party/modules/dhtmlx/grid/imgs/");
// Set the text for the header of the grid
mygrid.setHeader("Campaign ID, Year, Week, Country, Office, Region, da, dc, po, pro, x, Campaign, Programme, Description, Comment");
// Attach 2nd level header and selections options
mygrid.attachHeader("#select_filter,#select_filter,#select_filter,#select_filter,#select_filter,#select_filter, , , , , ,#select_filter,#select_filter");
// Set the width of the cells row for the grid
mygrid.setInitWidths("100,50,50,*,*,*,30,30,30,30,30,*,*,20,20");
mygrid.enableAutoWidth(true);
// Set the Column Alignment
mygrid.setColAlign("left,left,left,left,left,left,left,left,left");
// Set the column types for the grid mygrid.setColTypes("ed,ed,ed,combo,combo,combo,ed,ed,ed,ed,ed,combo,combo,ed,ed");
// mygrid.getCombo(5).put(2, 2);
mygrid.setColSorting("int,date,str,int,int,int,int,int,int,int,int,int,int,int,int");
// Grouping of columns
mygrid.groupBy(1);
// Enable Light Mouse Navigation
mygrid.enableLightMouseNavigation(true);
// Enable enable hot keys
mygrid.enableKeyboardSupport(true);
// Initialize
mygrid.init();
// Set skin
mygrid.setSkin("dhx_skyblue");
// Load Data
mygrid.loadXML("action/data");
// Set Paging Mode
// mygrid.setPagingWTMode(true,true,true,[30,60,90,120]);
// Set Template
mygrid.setPagingTemplates("Pages - [current:0] [current:+1] [current:+2] , from [total] rows","");
// enable paging and sets its skin;
mygrid.enablePaging(true, 25, 10, "pagingArea", true, "recinfoArea");
mygrid.setPagingSkin("bricks");
mygrid.attachEvent("onEditCell",function(stage){
if (stage == 2)
// refresh_chart();
return true;
});
var dp = new dataProcessor("action/data");
dp.action_param = "dhx_editor_status";
dp.attachEvent("onAfterUpdate", function(sid, action, tid, xml){
if (action == "invalid"){
mygrid.setCellTextStyle(sid, 2, "background:#eeaaaa");
// dhtmlx.message(xml.getAttribute("details"));
}
// else
// dhtmlx.message("["+action+"] Data saved in DB");
})
dp.init(mygrid);
combo = mygrid.getColumnCombo(3);
combo.loadXML("action/country");
combo = mygrid.getColumnCombo(4);
combo.loadXML("action/office");
combo = mygrid.getColumnCombo(5);
combo.loadXML("action/region");
combo = mygrid.getColumnCombo(11);
combo.loadXML("action/campaign");
combo = mygrid.getColumnCombo(12);
combo.loadXML("action/programme");
Any ideas on what causes this issue, I have 575 records in the database and the associated tables for the combo - non having more that 200 records.