Hi there, If you don't know the column names, how are you setting the value for dgc.headerText? I think this may be the key to your problem.
- Jim --- In flexcoders@yahoogroups.com, coder3 <rrhu...@...> wrote: > > > Hi, > > I have a datagrid, the datagridColumns are dynamic, so i build the columns > after i get the result. > > private function buildColumn(dataFieldName:String):DataGridColumn > { > var tempArr:Array = []; > var dgc:DataGridColumn = new DataGridColumn(); > dgc.showDataTips = true; > dgc.dataTipFunction = dgDataTipFunc; > dgc.dataField = dataFieldName; > tempArr.push(dgc); > ::: > myDG.columns = tempArr; > } > > My problem is, i also need to build a dataTip for each column i create. > since i don't know the column names, and there might be plenty. how to write > an easy dataTipFunction to show the column datafield, like the following? i > think it needs to involve an eventlistener. but not sure how. > > > private function dgDataTipFunc(item:Object):String > { > return item.[how to find out the mouse-over column.datafield????]; > } > > > ThankS!!! > > -- > View this message in context: http://www.nabble.com/DataGridColumn-dataTipFunction-HELP-tp21802284p21802284.html > Sent from the FlexCoders mailing list archive at Nabble.com. >