The DateField expects a data[dataField] to be of type Date not String.
You'll probably have to convert String to Date.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Chad Sherwood
Sent: Thursday, March 22, 2007 11:05 AM
To: [email protected]
Subject: [flexcoders] Re: Inline DateField ItemRenderer causes Entire
Datagrid contents to disappear

 

I discovered that if I set the dataField="" in the 
<mx:DatagridColumn> tag, then it renders the DateField control. I'm 
stumped why I can't set the dataField="requested_date", which is a 
string representation of a properly formatted date out of the 
database... any thoughts?

Thanks,

Chad
--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Chad Sherwood" <[EMAIL PROTECTED]> 
wrote:
>
> I have 7 different itemRenderers in my datagrid. As long as I 
don't 
> use the DateField as an inline ItemRenderer, everything is fine, 
all 
> other renderers actually appear, along with the data they contain. 
> As soon as I add in the "simplest" version of the DateField object 
as 
> the itemRenderer, everything in the datagrid completely disappears.
> 
> Anyone have any thoughts on what might be happening?
> 
> 
> Here is my datagrid layout:
> 
> <mx:DataGrid id="catalogsGrid"
> width="{this.width-100}"
> height="{this.height-150}"
> sortableColumns="true" > 
> <mx:columns>
> <mx:DataGridColumn 
> dataField="status_indicator" 
> editable="false" 
> editorDataField="value" 
> headerText="Status"
> rendererIsEditor="true" >
> <mx:itemRenderer> 
> <mx:Component > 
> <mx:ComboBox 
> dataProvider="{outerDocument.statusDataProvider}" 
> text="{data.status_description}"
> dataChange="outerDocument.setStatus
> (event)" change="outerDocument.changeStatus
> (event)"/>
> </mx:Component> 
> </mx:itemRenderer>
> </mx:DataGridColumn>
> <mx:DataGridColumn 
> dataField="quantity" 
> editable="true" 
> editorDataField="value" 
> headerText="Quantity" 
> rendererIsEditor="true" 
> width="65">
> <mx:itemRenderer > 
> <mx:Component> 
> <mx:NumericStepper 
> minimum="1" maximum="99"/>
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> <mx:DataGridColumn 
> dataField="requested_date" 
> headerText="Requested On" 
> editorDataField="selectedDate" 
> itemRenderer="mx.controls.DateField">
> </mx:DataGridColumn>
> <mx:DataGridColumn 
> dataField="labels_printed_date" 
> headerText="Printed On" 
> editorDataField="text" 
> editable="false" 
> rendererIsEditor="false" 
> width="120" >
> <mx:itemRenderer >
> <mx:Component>
> <mx:TextInput 
> editable="false"/> 
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> ...
>

 

Reply via email to