RE: [flexcoders] Re: showDataTips are not working for the Datagrid columns having itemRenderers

2008-03-04 Thread Tracy Spratt
I think columnIndex is a property on listData.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dfalling
Sent: Tuesday, March 04, 2008 10:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: showDataTips are not working for the Datagrid
columns having itemRenderers

 

Thanks for the response... My confusion is because I'm not sure
exactly how to get access to the column from the item renderer. I'm
using data[DataGridListData(listData).dataField] to access the data to
make reusable, but don't see any way via data or listData to get a
reference to the column. If there's another way to get at itemToData
or the dataTipFunction, I'd love to hear it.

Thanks.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 dataTipField/dataTipFunction is used to map the dataProvider to a
string
 to be displayed by a renderer. The renderer can just call
 itemToDataTip(data) on the column. The resulting string is the
 dataTip/tooltip.
 
 
 
 If I plug such a renderer into a DG with data that looks like {
 firstname: alex, lastname: harui } I can set the dataTipField to
 lastname, but If I've got some complex XML like
 
 
 
 person
 
 name
 
 firstNameAlex/firstName
 
 lastNameHarui/lastName
 
 /name
 
 address
 
 citySF/city
 
 stateCA/state
 
 /address
 
 /person
 
 
 
 I can cook up a dataTipFunction like 
 
 data..lastName + ,  + data..firstName +   + data..city
 
 
 
 I think that's what you want, or I don't understand what you're
looking
 for.
 
 -Alex

 



RE: [flexcoders] Re: showDataTips are not working for the Datagrid columns having itemRenderers

2008-03-04 Thread Alex Harui
Check out the validateProperties() method in DataGridItemRenderer.as.
It uses columnIndex to get the column and the dataTip

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dfalling
Sent: Tuesday, March 04, 2008 12:52 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: showDataTips are not working for the Datagrid
columns having itemRenderers

 

It is, but that's an int...I'm not sure how that helps me get access
to the column itself or to the datatip function.

Is there a better place for asking questions like these? I feel like
everyone's expecting a level of knowledge beyond mine and don't want
to post here if another place would be more appropriate.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Tracy Spratt [EMAIL PROTECTED] wrote:

 I think columnIndex is a property on listData.
 
 Tracy

 



RE: [flexcoders] Re: showDataTips are not working for the Datagrid columns having itemRenderers

2008-02-29 Thread Alex Harui
dataTipFunction?

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dfalling
Sent: Friday, February 29, 2008 11:14 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: showDataTips are not working for the Datagrid
columns having itemRenderers

 

What's the best practice method of having custom datatips with
reusable item renderers? I don't want my item renderer to be coupled
to any of the grids that are using it, but need to show a datatip that
relies on several different fields in certain grids.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 The item renderer is responsible for showing the datatips.

 



RE: [flexcoders] Re: showDataTips are not working for the Datagrid columns having itemRenderers

2008-02-29 Thread Alex Harui
dataTipField/dataTipFunction is used to map the dataProvider to a string
to be displayed by a renderer.  The renderer can just call
itemToDataTip(data) on the column.  The resulting string is the
dataTip/tooltip.

 

If I plug such a renderer into a DG with data that looks like {
firstname: alex, lastname: harui } I can set the dataTipField to
lastname, but If I've got some complex XML like

 

person

name

firstNameAlex/firstName

lastNameHarui/lastName

/name

address

citySF/city

stateCA/state

/address

/person

 

I can cook up a dataTipFunction like 

data..lastName + ,  + data..firstName +   +  data..city

 

I think that's what you want, or I don't understand what you're looking
for.

-Alex



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of dfalling
Sent: Friday, February 29, 2008 9:09 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: showDataTips are not working for the Datagrid
columns having itemRenderers

 

I guess I'm missing something obvious...are you saying to create the
datatip field ahead of 
time in the file with the datagrid, and put a data tip function in the
item renderer that 
accesses that field if it exists?

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Alex Harui [EMAIL PROTECTED] wrote:

 dataTipFunction?