On Fri, Jan 16, 2009 at 12:07 PM, Dariusz Borowski <[email protected]>wrote:

> How does your RecordDef look like?
>

final RecordDef recordDef =
            new RecordDef(new FieldDef[] {
                new IntegerFieldDef("DATE_SORTFIELD_DATE_ID"),
                new DateFieldDef("DATE_SORTFIELD_DATE"),
                new StringFieldDef("DATE_SORTFIELD_DATE_STRING"),
                new StringFieldDef("DATE_SORTFIELD_LIST_COLOR")});

>
> Are you getting any data?
>
> yes, im retrieving data from a database and this linked to the grid store
> using Store. Im getting data in other columns, but in the specified column i
> dont get any if the rendered ive written is used.
>
>
> On Fri, Jan 16, 2009 at 7:26 AM, tanzeem <[email protected]> wrote:
>
>>
>> I have a gridPanel with one of the RecordDef as DateFieldDef .I tried
>> to format the output in the format 09/01/2009
>> using the following code, but its not working.The column becomes blank
>> with no entries populated when i tried to do the formatting. Please
>> help.
>>
>> ColumnConfig normalizedDateColumn =
>>            new ColumnConfig("NORMALIZEDDATE",
>>               "SORTFIELD_DATE", 150, true,new Renderer()
>>            {
>>
>>                                public String render(Object value,
>> CellMetadata cellMetadata,
>>                                                Record record, int
>> rowIndex, int colNum, Store store) {
>>
>>                                        Date date=new Date((String)value);
>>                                        DateTimeFormat fmt =
>> DateTimeFormat.getFormat("mm/dd/yyyy");
>>                                        String formatted=fmt.format(date);
>>
>>                                        return(formatted);
>>
>>                                }
>>
>>            }
>>            );
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to