I’m attempting to use the dhxCalendarA cell type but I’m having some difficulties.
First of all I cannot make the date picker appear at all if I’m using the dhxCalendarA cell type.
If I use the dhxCalendar cell type, the date picker appears, but I need to be able to edit the cell manually as well so I need the dhxCalendarA type.
I’m also having another problem, regardless of whether I use one or the other the grid.SetDateFormat() method doesn’t seem to be supported by the grid, or at least that is what the js error says.
Code:
—head-----------------------------
—body-----------------------------
mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.setImagePath(‘dhtmlxGrid/codebase/imgs/’);
mygrid.setHeader(“Product Id,Product Number,Product Name,Quantity,Unit Price,Discount %,Amount,Line Number,Delivery”);
mygrid.setColumnIds(“productId,productNumber,productName,quantity,unitPrice,discountPct,amount,lineNumber,delivery”);
mygrid.setInitWidthsP(“0,*,20,10,10,10,15,0,10”);
mygrid.setColTypes(“ro,edtxt,edtxt,edtxt,edtxt,edtxt,ro,ro,dhxCalendarA”);
mygrid.setColSorting(“str,str,str,int,int,int,int,int,date”);
mygrid.setColAlign(“left,left,left,right,right,right,right,right,center”);
mygrid.enableMultiselect(true);
mygrid.enableEditTabOnly(true);
mygrid.setTabOrder(“0,1,2,3,4,5,6,7”);
//mygrid.setDateFormat("%d-%m-%Y"); // doesn’t matter what I put here. always creates error
mygrid.init();
mygrid.setSkin(“dhx_skyblue”);
mygrid.parse(init_data); // init_data contains the initial data as xml
mygrid.sortRows(7, “int”, “asc”);
About the date picker itself, is it possible to define where the picker should appear in relation to the cell it is to update?
In my case I have the page containing only the grid in an iframe (not optional for me) and if I have a date cell as the last cell on a row, the date picker goes outside the iframe (iframe hides overflow otherwise the grid’s own scrollbar wont work properly or I would get double scrollbars on some occations).