flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Kessler (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FLEX-26779) DataGrid Problem
Date Sat, 14 Sep 2013 02:13:51 GMT

     [ https://issues.apache.org/jira/browse/FLEX-26779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Kessler closed FLEX-26779.
-------------------------------

    
> DataGrid Problem
> ----------------
>
>                 Key: FLEX-26779
>                 URL: https://issues.apache.org/jira/browse/FLEX-26779
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DataGrid
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Language Found: English
>            Reporter: Adobe JIRA
>            Assignee: Mark Kessler
>
>       Steps to reproduce:
> Example Code:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
> 	<mx:Script>
> 		<![CDATA[
> 			[Bindable]
> 			private var dp:Array = [
> 				{ STAFF_CODE: "admin", STAFF_NAME: "Sys Admin",isSelected:true},
> 				{ STAFF_CODE: "6073", STAFF_NAME: "testuser",isSelected:false},
> 				{ STAFF_CODE: "dormouse", STAFF_NAME: "no code",isSelected:false}
> 			];
> 		]]
>       >
> 	</mx:Script>
> 	<mx:DataGrid dataProvider="{dp}" width="100%">
> 		<mx:columns>
> 			<mx:DataGridColumn headerText="isSelected" dataField="isSelected" visible="false"/>
> 			<mx:DataGridColumn headerText="Staff Code" dataField="STAFF_CODE"/>
> 			<mx:DataGridColumn headerText="Staff Name" dataField="STAFF_NAME"/>
> 		</mx:columns>
> 	</mx:DataGrid>
> </mx:Application>
> 1.set 'isSelected' column visible="false"
> 2.click 'Staff Code' column to sort
> 3.enter word it will find in 'Staff Code' column, but actual finding in 'Staff Name'
column.
>  
> DataGrid.as Source Code:
> Function:
> /**
>      *  @private
>      *  used by ListBase.findString.  Shouldn't be used elsewhere
>      *  because column's itemToLabel is preferred
>      */
>     override public function itemToLabel(data:Object):String
>     {
>         return displayableColumns[sortIndex == -1 ? 0 : sortIndex].itemToLabel(data);
>     } 
>  
> the sortIndex is columns index, the function should be like this:
>     override public function itemToLabel(data:Object):String
>     {
>         return _columns[sortIndex == -1 ? 0 : sortIndex].itemToLabel(data);
>     }
>     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message