# \[Help\] The Text not show in this code

**URL:** <https://forum.kirupa.com/t/help-the-text-not-show-in-this-code/332235>\
**Category:** flash\
**Created:** [March 17, 2014, 4:34pm UTC](https://forum.kirupa.com/t/help-the-text-not-show-in-this-code/332235 "2014-03-17T16:34:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vietghost](https://avatars.discourse-cdn.com/v4/letter/v/5e9695/32.png) [@vietghost](https://forum.kirupa.com/u/vietghost)\
**Post date:** [March 17, 2014, 4:34pm UTC](https://forum.kirupa.com/t/help-the-text-not-show-in-this-code/332235/1 "2014-03-17T16:34:48Z")

</div>

Someone know what wrong in this code, plz help me Thanks

```auto
import fl.controls.DataGrid;
import fl.controls.TextInput;
import fl.controls.dataGridClasses.DataGridColumn;
import fl.data.DataProvider;
// ******************************************************************* //
var dp:DataProvider = new DataProvider();
dp.addItem({item:"Asparagus", price:"Rapid Move"});
dp.addItem({item:"Brussel Sprouts", price:"0.27" });
dp.addItem({item:"Cabbage", price:0.04 });
dp.addItem({item:"Cauliflower", price:0.16 });
dp.addItem({item:"Cauliflower", price:0.16 });
dp.addItem({item:"Cauliflower", price:0.16 });
dp.addItem({item:"Cauliflower", price:0.16 });
dp.addItem({item:"Cauliflower", price:0.16 });
dp.addItem({item:"Cauliflower", price:0.16 });
// ******************************************************************* //
var itemCol:DataGridColumn = new DataGridColumn("item");
itemCol.headerText = "Command:";
// ******************************************************************* //
var priceCol:DataGridColumn = new DataGridColumn("price");
priceCol.headerText = "Description:";
priceCol.labelFunction = priceLabelFunction;
priceCol.sortOptions = Array.NUMERIC;
var myDataGrid:DataGrid = new DataGrid();
myDataGrid.addColumn(itemCol);
myDataGrid.addColumn(priceCol);
myDataGrid.dataProvider = dp;
myDataGrid.width = 200;
myDataGrid.rowCount = myDataGrid.length;
myDataGrid.move(10, 40);
addChild(myDataGrid);
// ******************************************************************* //
function priceLabelFunction(item:Object):String {
return "" + Number(item.price).toFixed(2)}
itemTextInput.addEventListener(Event.CHANGE, changeHandler);
function changeHandler(event:Event):void {
var arr:Array = dp.toArray();
var filteredArr:Array = arr.filter(filterDataProvider);
myDataGrid.dataProvider = new DataProvider(filteredArr)}
// ******************************************************************* //
function filterDataProvider(obj:Object, idx:int, arr:Array):Boolean {
var txt1:String = itemTextInput.text;
var txt2:String = obj.item.substr(0, txt1.length);
if (txt1.toLowerCase() == txt2.toLowerCase()){
return true}
return false}

```
