Hello
I’m new at dhtmlxGrid and so I have a question about setting a custom date format.
I tried to load data from a HTML table
like
value 11 |
12 |
10/12/2008 |
and I call following code to init it,
but it doesn’ work
var aGrid = new dhtmlXGridFromTable(‘tblToGrid’);
aGrid.setColSorting(“str,int,date”);
aGrid.setColTypes(“ro,ro,calendar”);
aGrid.setDateFormat(“d.m.y”);
Is the date input format wrong?
Any other wrong code in my example?
Kind Regards
Klaus
When loading data from HTML , you need to define format as part of HTML table, in other case it will be applied to late.
<table forceCellTypes=“true” …
Header A |
Header B |
<td format=“d.m.y”>Header C
value 11 |
12 |
10/12/2008 |
sorry, but it doesn’t work anyway.
We are using the evaluation package of dhtmlxTreeGrid v.1.5 Professional.
So I hope that this function will be supported at this version because
I haven’t anything found at the js file (dhtmlxgrid_start.js).
Would it be possible to send us a complete example?
We also need the possibility to format the numbers with
"," as decimal part separator and
"." as groups separator.
Everything must work by loading from a html table!!!
Kind Regards
Klaus
Please try to use attached js file instead of original one - with it format options will be available for both calendar and numeric cells.
>>We also need the possibility to format the numbers with
dhtmlx.com/docs/products/dhtmlxG … ormatcells
dhtmlxgrid_start.zip (1.71 KB)
1211288000.zip (759 Bytes)
thx
the date format now works well but
the number format doesn’t work as needed
because we need “0.000,00” instead of “0,000.00”
another bug in your example was that forceCellTypes=“true” has been missing.
>>because we need “0.000,00” instead of “0,000.00”
It can be set only through setNumberFormat command, can’t be set from HTML
dhtmlx.com/docs/products/dhtmlxG … ating.html