Hello,
I have the following Grid definitionen:
var consignments = new dhtmlXGridObject(‘consignments’);.
.
.
consignments.setInitWidths(“50,95,100,130,70,100,100,140,100”);
consignments.setColAlign(“center,center,center,center,center,center,center,center,center”);
consignments.setColTypes(“ro,ro,ro,ro,ro,ro,ro,ro,ro”);
consignments.setColSorting(“na,str,str,str,str,str,date,str,str”);
…
.
consignments.setDateFormat(“dd.MM.yy, HH:mm”);
The sort of the date field does not work. In IE6 nothing happens, if column header is clicked. In the FF2 only one row gets another sort order.
Best Regards
Date formatting can be applied to dhxCalendar and dhxCalendarA columns. So you should set column types like this:
consignments.setColTypes(“ro,ro,ro,ro,ro,ro,dhxCalendar,ro,ro”);
To use dhxCalendar type you should to include the following files:
dhtmlxgrid_excell_dhxcalendar.js
dhtmlxCalendar/codebase/dhtmlxcalendar.css
dhtmlxCalendar/codebase/dhtmlxcalendar.js
Hello and
thanks for your answer,<o:p></o:p>
my focus is
not formatting date but sorting date column. If I use column type �dhxCalendar�
the column fields are editable. I need the date column as read only and sortable
with the defined format. <o:p></o:p>
Thanks in
advance<o:p></o:p>
You can use dhxCalendar and use
mygrid.attachEvent(“onEditCell”,function(stage,id,ind){
if (ind == INDEX ) return false;
return true;
})
where INDEX - index of calendar’s column
It will make it readonly.