I have a rather complex grid and am having a problem getting date data to display. I have added a portion of the code and a portion of the xml below. In row 1, I have dates in the xml. I have defined the whole row as dhxCalendar type. The calendar works fine and the dates are saved, but I can’t get the dates to display.
If you tell me how, I will upload the whole XML file (251 lines) and all of the code (309 lines) and a screen shot of the problem. To much to include here, I think.
Charlie
CODE SNIPIT
bodyg = new dhtmlXGridObject(‘bodygrid’);
bodyg.setImagePath("/grid3/dhtmlxgrid/codebase/imgs/");
bodyg.setColTypes(“ro,ro,ed,ed,ed,ed,ed,ed,ed,ed,ro”);
bodyg.enableCollSpan(true);
bodyg.loadXML("/grid3/queries/expgrid.cfm?sec=2&fid=#attributes.fid#");
bodyg.attachEvent(“onXLE”,loadBody);
bodyg.enableEditEvents(true,true,true);
bodyg.enableLightMouseNavigation(true);
bodyg.setStyle(“background: white;”, “background: white;”, “background: yellow;”, “background: lime;”)
bodyg.setOnEditCellHandler(doOnCellEdit);
bodyg.setDateFormat("%m/%d/%y");
…
XML SNIPIT
<?xml version="1.0" encoding="UTF-8"?>
Sun
Mon
Tue
Wed
Thu
Fri
Sat
Charged to Agency
Paid by Employee
Date
06/01/08
06/02/08
06/03/08
06/04/08
06/05/08
06/06/08
City
St Pete1
Hills2
Spring HIll4
Ocala4
Brandon5
Largo6
LOL7
Personal Car
…
Please try to use attached js file instead of original one ( this is latest version, which has some minor date formating issues resolved )
If problem still occurs for you - please send any kind of sample where issue can be reconstructed to support@dhtmlx.com
>>I have defined the whole row as dhxCalendar type
Not sure , how it was done in your case, but with setRowExcellType - the same XML works correclty locally.
dhtmlxgrid_excell_calendar.zip (13.7 KB)
Found the problem. There apparently is a bug that makes the setRowExcellType function not work properly if one of the columns in the row is joined with another row. For instance, I had …
bodyg.setRowspan(0,9,4);
bodyg.setRowspan(0,10,4);
setRowExcellType(1,“dhxCalendar”)
so, since I had defined a column in row 0 to span 4 rows, that would effect row 1. Then when I tried to set row 1 to the dhxCalendar type, it wouldn’t work.
I confirmed this was the problem by removing the row span and the row 1 calendar columns worked fine. I then removed the setRowExcellType(1,“dhxCalendar”) and replaced it with several setCellExcellType and everything works great. Just thought I would pass this along incase you wanted to fix the bug or to post the limitation so others aren’t fighting through the same problem.
By the way, I like your products VERY much.
Charlie
The problem confirmed ( with current design, the rowspaned section can be accessed only by coordinates of its topmost cell , the row oriented commands will not affect it )
We will try to resolve situation in next version.