I am using DHTMLX Grid component v2.1 Pro as well as v2.5 Pro.
I have specified the column type as ‘ro’ (as i want it to be readonly cell).
I have specified the sort type as ‘date’.
I have specified the format of column as ‘%m.%d.%y’.
<?xml version="1.0" encoding="UTF-8"?>
<column width="50" type="ro" align="right" color="white" sort="str">Name</column>
<column width="200" type="ro" align="center" format="%m.%d.%y" sort="date">Date of Publication</column>
<column width="80" type="ro" align="center" sort="str">In Store</column>
<row id="3" selected="1">
<cell>Honore de Cruason</cell>
But, in the UI, its not displaying the dates in the specified format & is just displaying the date in the way they are specified in the data cells.
- Could you please let me know the correct way of specifying the format, so that the dates displayed in the data cells can be represented in the specified column format without changing the data of the xml.
- Also, if i specify the date in other formats in the data cells, eg, 28.11.1998, then the sorting does not work.
Could you please let me know if i am doing it in wrong way & tell me the correct way of doing it.
If i am doing it correctly, could you please let me know the work around to acheive these features?
If you are using dates in custom format, you need to use dhxCalendar cell and setDateFormat command to organize correct sorting.
date-formatting applied only against dhxCalendar and dhxCalendarA column types ( ro and other columns are unaffected by this setting )
Or you can use custom sorting routine
docs.dhtmlx.com/doku.php?id=dhtm … te_sorting
I have the column as non-editable, so i cannot use dhxCalendar and dhxCalendarA as type. I read in the documentation that ‘ron’ which is extension of ‘ro’ supports formatting, but it also did’t work for the date type of components.
I need to display the dates in user locale specific format (or in specified format). Also, i need to achieve the sorting feature.
Could you please provide me some way to achieve this?
You still can use such column type, just add
if (index == SOME)
where SOME - index of column which must be readonly
I have tried to change the column type of Grid as dhxCalendar, it working fine for english and some SE Asian languages, but it failing for other languages like French and canadian.
Attached is sample.
Can you please look into the issue related to the support with different locales(languages).
Please let me know if there any plan to add the support for multiple languages for dates schedule in the next release.
SortCalenderColumnGrid.zip (114 KB)