View Full Version : DataColumn Date Format.

Mar 05, 2009, 11:47 AM
I'm using this code... and Don't work for me.
someOne.. can help me Please.!

Dim _col As New Coolite.Ext.Web.Column
_col.DataIndex = column.ColumnName.Trim
_col.Header = DatosColumna.ColTitulo
Dim strformat As String
strformat = "d/m/Y"
rn.Fn = "Ext.util.Format.dateRenderer('" + strformat + "')"
_col.Renderer = rn

And render "NaN/NaN/NaN" in my gridPanel column.

What i'm doing Wrong-..?


Gustavo Montero G.

Mar 05, 2009, 2:40 PM
Hi grmontero,

I would appear the record value is not being converted into a Date object correctly, before being passed to the dateRenderer. 

Typically in the Store you would define a RecordField similar to the following:

<ext:RecordField Name="MyDateTimeField" Type="Date" />

If MyDateTimeField is a DateTime object on the server, then the record field will be automatically parsed into a Date object on the client and passed correctly into the dateRenderer. 

We might need to see some more code or even better a simplified .aspx code sample demonstrating the full scenario. 

Hope this helps.

Mar 05, 2009, 3:33 PM
Yes... !

Thank's Geoffrey.