Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
Adobe Flex SDK Previous
-
None
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows XP
Language Found: English
Description
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: "dormouse", STAFF_NAME: "no code",isSelected:false} ];
]]
>
</mx:Script>
<mx:DataGrid dataProvider="
" 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
Attachments
Issue Links
- duplicates
-
FLEX-28957 CLONE -DataGrid Problem
- Open