|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Datagrid duplicate rowHello Tracy,
Im experiencing same problem too, added that in my case the data in first row was repeated in next row when i insert data on database and load all data in datagrid.(although the list is < 10) I use remoteobject to save and get all the list of data. When i save the data and get successful save, I simply call the ListEvent, in the result handler, for dispatch and update the arraycollection of data. Im using a renderer to format the display of date. here is the code snippet in datagrid column and renderer itself: <mx:DataGridColumn headerText="Start Time"> <mx:itemRenderer> <mx:Component> <buscomp:DateTime startDate="{data.startTime}"/> </mx:Component> </mx:itemRenderer> </mx:DataGridColumn> ...in the renderer.. <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " creationComplete="formattingDate();" > <mx:Script> <![CDATA[ [Bindable] public var startDate:Date; [Bindable] public var finalDate:String; public function formattingDate():void { // create a utility that format the date& time to MM/DD/YY hh:mm:ss this.finalDate = dateformat.format(startDate)+' '+startDate.getHours() +':'+startDate.getMinutes(); } ]]> </mx:Script> <mx:DateFormatter id="dateformat" formatString="MMM-DD-YYYY"/> <mx:Label text="{finalDate}" styleName="myText"/> </mx:HBox> ...im just wondering why the data in first got duplicated in next row? does datagrid has some sort of cache? becuase from my previous code (e.g user listng) the datagrid just work fine everytime i save and get the list of data.the data i just save was reflected on the datagrid (no duplication). Thanks a lot. Cheers. |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |