Grid with dhxCalendar to not be editable

Hi,

I have a grid and the rows start_date and end_date I want to format date. I use this code.

[code]

gridUser = tabbar.cells(“tabUser”).attachGrid();

headerUser = translate(‘name’)+’,’+translate(‘role’)+’,’+translate(‘email’)+’,’+translate(‘start_date’)+’,’+translate(‘end_date’);

gridUser.setHeader(headerUser);

gridUser.attachHeader("#text_filter,#select_filter,#text_filter,#text_filter,#text_filter");

gridUser.setColTypes("ro,ro,ro,dhxCalendar,dhxCalendar");

gridUser.setColSorting("str,str,str,date,date");

gridUser.setColAlign("left,left,left,left,left");

gridUser.setColumnIds("name,role,email,start_date,end_date");

gridUser.setDateFormat("%d-%m-%Y %H:%i:%S", "%Y-%m-%d %H:%i:%S");

gridUser.enableColumnMove(true);

gridUser.load(phpUser);

gridUser.init();[/code]

The problem is that my grid it’s not having edit inline, but at the calendar field, if I click on it, I see the calendar widget, and if I select a date, the row it’s changing, and it’s working inline edit. I don’t want that.

I just want the start_date and end_date to be formated after the code:

gridUser.setDateFormat("%d-%m-%Y %H:%i:%S", "%Y-%m-%d %H:%i:%S");

If I’m using

[code]

gridUser.setColTypes(“ro,ro,ro,ro,ro”);
[/code]

the date it’s not formated in the wanted format %d-%m-%Y %H:%i:%S.

Another approach was:

[code]
function eXcell_datero(cell) {
if (cell){ //default pattern, just copy it
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.base = eXcell_dhxCalendar;
this.edit = function(){}
}

eXcell_datero.prototype = new eXcell;
gridUser = tabbar.cells(“tabUser”).attachGrid(); translate(‘name’)+’,’+translate(‘role’)+’,’+translate(‘email’)+’,’+translate(‘start_date’)+’,’+translate(‘end_date’);
gridUser.setHeader(headerUser);
gridUser.attachHeader("#text_filter,#select_filter,#text_filter,#text_filter,#text_filter");
gridUser.setColTypes(“ro,ro,ro,datero,datero”);
gridUser.setColSorting(“str,str,str,date,date”);
gridUser.setColAlign(“left,left,left,left,left”);
gridUser.setColumnIds(“name,role,email,start_date,end_date”);
gridUser.setDateFormat("%d-%m-%Y %H:%i:%S", “%Y-%m-%d %H:%i:%S”);
gridUser.enableColumnMove(true);
gridUser.load(phpUser);
gridUser.init();[/code]

But the format cell it’s not formated

Could you help me with a solution?

Regards

Please, try to use the onEditCell event to block the edit operation of the cell with calendar.
For example:

gridUser.attachEvent("onEditCell", function(stage,rId,cInd,nValue,oValue){ if(stage==0){ if(cInd==3||cInd==4) return false } return true; });