# Somebody know

**URL:** https://forum.kirupa.com/t/somebody-know/278189
**Category:** flash
**Created:** [December 23, 2008, 6:05pm UTC](https://forum.kirupa.com/t/somebody-know/278189 "2008-12-23T18:05:11Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![grosu\_insegment](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@grosu\_insegment](https://forum.kirupa.com/u/grosu_insegment)
#### Post date: [December 23, 2008, 6:05pm UTC](https://forum.kirupa.com/t/somebody-know/278189/1 "2008-12-23T18:05:11Z")

</div>

A have a map with more small pieces of lands, and I have a DataGrind where is the names of the which land, I need when to select the name of land the respective piece of land to colorize in the some color.

business\_dg.vScrollPolicy = “auto”;  
DGlistener = new Object();  
//function when pressing on a cell in datagrids  
DGlistener.cellPress = function(evt){  
if(evt.target==business\_dg){  
var nr:Number = evt.itemIndex  
var st:String = evt.target.selectedIndex

//This trace command is only for offline testing  
//it is not ment for online testing  
trace (“You selected “+business\_ds.items[st].griditem+” which is number “+business\_ds.items[nr].pkGrid);  
//code below displays the selection in Dynamic text field  
//This has been put to help you figure out how to detect what is selected.  
trace\_click.htmlText = “You selected \<b\>”+data\_grid.items[st].griditem+”\</b\> which is number \<b\>”+data\_grid.items[nr].pkGrid+"\</b\>";  
\_root.details\_mc.company\_txt.text = business\_ds.items[st].Homesite\_List;  
\_root.details\_mc.address\_txt.text = “”;//business\_ds.items[st].HomeNumb;  
\_root.details\_mc.tel\_txt.text = business\_ds.items[st].Telephone;  
\_root.details\_mc.website\_txt.text = “\<a href=”"+business\_ds.items[st].Website+"" target="\_blank"\>"+business\_ds.items[st].Website+"\</a\>";  
\_root.details\_mc.email\_txt.text = “\<a href=“mailto:”+business\_ds.items[st].Email+”"\>"+business\_ds.items[st].Email+"\</a\>";  
\_root.details\_mc.picture\_img.load(“images/”+business\_ds.items[st].Picture);  
\_root.details\_mc.details\_txt.text = business\_ds.items[st].Details;  
this.updateData(0)  
}  
}  
//Setup which event to listen  
business\_dg.addEventListener(“cellPress”, DGlistener); //Press on datagrid  
//This line turns off the coloum sorting  
business\_dg.sortableColumns = false;  
stop();
