History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-12587
Type: Bug Bug
Status: Closed Closed
Resolution: Not a Bug
Priority: C C
Assignee: Haruhide Yasukawa
Reporter: Haruhide Yasukawa
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Flex SDK

after sorting, updating data adds another line at the bottom of dg

Created: 09/10/07 04:58 AM   Updated: 09/10/07 12:34 PM
Component/s: mx: DataGrid
Security Level: Public (All JIRA Users )

File Attachments: 1. File testcase1.mxml (3 kb)


Severity: Incorrectly Functioning with Workaround
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Flex2.0.1 - HotFix 3 (Released)
Affected OS(s): All OS Platforms - All
Steps to Reproduce:
Steps to reproduce:
1.run testcase
2.sort Name on DG to click the header
3.to update the data, input 2, 2, and xyz at Row, Col, setValue at the top of the app
4.click setCellData
 
 Actual Results:
 the bottom of dg, additonal line were added
 
 Expected Results:
 no additional line
 
 Workaround (if any):
 
 
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Robert Vollmar
Resolved by: Robert Vollmar
Participants: Haruhide Yasukawa and Robert Vollmar
Browser: Other (specify version)
JDK: Sun 1.5.x


 All   Comments      Sort Order:
Robert Vollmar - [09/10/07 11:49 AM - edited ]
Able to reproduce in mainline build 181831. Able to reproduce in 2.0 and 2.0.1; not a regression. Note that if you sort again, the extra line disappears. A workaround is to make a copy of the object. e.g.:

// Original code
// var obj:Object = dg.dataProvider[Row];
// obj[dg.columns[Col].dataField] = Object(strVal);
// arrData.setItemAt(obj, Row);

// New code
var obj:Object = ObjectUtil.copy(dg.dataProvider[Row]);
obj[dg.columns[Col].dataField] = Object(strVal);
arrData.setItemAt(obj, Row);

Robert Vollmar - [09/10/07 12:33 PM ]
Per Alex, not a bug:
- You shouldn't set an object that is already in the DP.
- The following change works:

//arrData.setItemAt(obj, Row);
arrData.itemUpdated(obj);

I agree, NAB.