flex 中 DataGrid里的DataGridColumn 格式化时间
发布时间:2020-12-15 04:14:53 所属栏目:百科 来源:网络整理
导读:mx:Script ??![CDATA[ private function formatStart(item:Object,column:DataGridColumn):String{ ??????????? return df.format(item.datetime);// ??? } ]] ? ? ?mx:DateFormatter id="df" formatString="YYYY-MM-DD H:NN:SS"/ mx:DataGrid x="10" y="40"
<mx:Script>
??<![CDATA[
private function formatStart(item:Object,column:DataGridColumn):String{
??????????? return df.format(item.datetime);// ??? }
]]>
?
?
?<mx:DateFormatter id="df" formatString="YYYY-MM-DD H:NN:SS"/>
<mx:DataGrid x="10" y="40" id="dataShow" dataProvider="{this.visitedLocation.visitedLocation.lastResult.Tables.Table.Rows}" width="499" height="331"? >//dataprovider写自己的 ??<mx:columns> ???<mx:DataGridColumn headerText="编号" dataField="uid" width="40"? /> ???<mx:DataGridColumn headerText="地点" dataField="location" width="70" /> ???<mx:DataGridColumn headerText="时间"???? dataField="datetime"?? labelFunction="formatStart"? />//主要是这里 用labelfunction ??</mx:columns> ?</mx:DataGrid>
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 找不到列 "dbo" 或用户定义的函数或聚合 "dbo.
- oracle中SELECT DISTINCT 的非常规用法
- 对于观察者模式、Reactor模式、Proactor模式的一点理解
- tnsnames.ora配置远程oracle后,plsql无法连接
- 正则表达式知识详解之实战 获取网页中的邮箱地址 (java版示
- iphone – 每次打开我的项目时,Xcode都会意外退出
- swift-07-使用for-in 遍历数组
- 详解VB调用C#类库的方法步骤
- 'cocos2d::LabelTTF::getContentSize': 被声明为已
- React Native 生成 released apk图片不显示