ItemRenderer on Basic DataGrid doesn't work on 0.9.6
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
There is an issue with itemRenderer on DataGrid.
The following code show empty cells (count cells is right but no text)
```
@namespace js "library://ns.apache.org/royale/basic";
.DataGridColumnList .StringItemRenderer {
border-style: solid;
border-color: #CCCCCC;
border-width: 1px;
background-color: white;
line-height: 40px;
padding: 2px;
}
.DataGridColumnList .DataItemRenderer {
border-style: solid;
border-color: #CCCCCC;
border-width: 1px;
background-color: white;
line-height: 40px;
padding: 2px;
}
```

When debugging js the issue is on setting data on itemRenderer :
(_DataItemRendererFactoryForArrayData.as_) function `dataProviderChangeHandler`
...
_ir.data = dp[i];_ // dp = ArrayList with right datas
jump to (_StringItemRenderer.as_)
```
org.apache.royale.html.supportClasses.StringItemRenderer.prototype.set__data = function(value) {
org.apache.royale.html.supportClasses.StringItemRenderer.superClass_.set__data.apply(this, [ value] );
this.text = this.dataToString(value);
};
```
**value** is undefined when enter function
Source code
[DataGridExample.zip](https://github.com/apache/royale-asjs/files/3731342/DataGridExample.zip)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the DataGridExample.zip reproduction and setting the ArrayList data provider. Read _DataItemRendererFactoryForArrayData.as, especially dataProviderChangeHandler, then follow the value passed into StringItemRenderer.as and its set__data function. Done means the DataGrid cells display the expected label and value text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100