Re: [flexcoders] Hide datagrid column at runtime

2006-10-31 Thread Paul Hastings
On 11/1/06, Valy Sivec [EMAIL PROTECTED] wrote:

I need to build a datagrid an hide/display some columns based on some 
 custom logic as response to user interaction with the app. Can't figure out a 
 way to do that... adding a visible={myCustomlogicReturnsBoolean} to the 
 datagrid column resulted in a compilation error.

the datagrid's columns property should do the trick. it returns an
array of DataGridColumn where visible is one of the properties you
can mess with.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 



RE: [flexcoders] Hide Datagrid column

2005-04-11 Thread Valy Sivec




Matt,

Am I missing something?. The selected row from the grid is used to populate pop-up window's forms elements; the user can edit the form fields and then save the modified form( fire an update ). I need the primary key in the datagrid to be able locate/update the right recordthat's why I would need to have the pk in the drig but not display it


grid populated via model: addressModel


 mx:DataGrid id="dgAddress" rowCount="2" width="95%" cornerRadius="0" dataProvider="addressModel"
 mx:columns mx:Array mx:DataGridColumn headerText="Phad_id" columnName="phad_id"/ -- primary keymx:DataGridColumn headerText="Address" columnName="phad_address" / mx:DataGridColumn headerText="City" columnName="phad_city" / mx:DataGridColumn headerText="State" columnName="phad_state_province" / mx:DataGridColumn headerText="Zip Code" columnName="phad_postal_code" /
 /mx:Array /mx:columns /mx:DataGrid



public function editAddressEvent() {if ( dgAddress.selectedItem.phad_address == undefined ) {  mx.core.Application.alert( "Select a record!" ); }else {  //record is selected  var addressVO : AddressVO = new AddressVO(); addressVO.phad_id = dgAddress.selectedItem.phad_id; addressVO.phad_adty_address_code = dgAddress.selectedItem.phad_adty_address_code; addressVO.phad_address = dgAddress.selectedItem.phad_address; addressVO.phad_postal_code = dgAddress.selectedItem.phad_postal_code;
 addressVO.phad_city = dgAddress.selectedItem.phad_city; var addressPopup=mx.managers.PopUpManager.createPopUp( this, editAddress, true, {address : addressVO, indexRecord : dgAddress.selectedIndex} );
 addressPopup.centerPopUp(Application.application);}  } 

TIA,
ValyMatt Chotin [EMAIL PROTECTED] wrote:









If you want a column to not show you’ll basically need to specify the other columns (the ones you want to show) manually. So create DataGridColumn entries for all columns you want and leave off the primary key.

Matt





From: Valy Sivec [mailto:[EMAIL PROTECTED] Sent: Sunday, April 10, 2005 4:52 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Hide Datagrid column

Hello flexcoders,A trivial situation:Have a datagrid and after selecting a row canedit/update the selected row via a pop-up window. Iwant that one column of the data grid ( primary key )to be hidden, but didn't find how... I need theprimary key in the popup to be able locateupdate thesource record..Thanks for your time.Valy  __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site!http://smallbusiness.yahoo.com/resources/ 
		Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site! 







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










RE: [flexcoders] Hide Datagrid column

2005-04-11 Thread Valy Sivec

Okay Matt, I got it... I should have looked more at
the dataProvider instead being focused to hide a grid
column... jsp all habit...

Thanks,
Valy

--- Matt Chotin [EMAIL PROTECTED] wrote:
 If you just get rid of mx:DataGridColumn
 headerText=Phad_id
 columnName=phad_id/ -- primary key everything
 should work I'd think (well
 and dataProvider should be {addressModel} with
 binding tags but that's
 probably just a typo here.
 
  
 
 Matt
 
   _  
 
 From: Valy Sivec [mailto:[EMAIL PROTECTED] 
 Sent: Monday, April 11, 2005 5:38 AM
 To: flexcoders@yahoogroups.com
 Subject: RE: [flexcoders] Hide Datagrid column
 
  
 
  
 
 mx:DataGrid id=dgAddress rowCount=2
 width=95% cornerRadius=0
 dataProvider=addressModel
 
   mx:columns
 mx:Array
mx:DataGridColumn headerText=Phad_id
 columnName=phad_id/ --
 primary key
mx:DataGridColumn headerText=Address
 columnName=phad_address
 /
mx:DataGridColumn headerText=City
 columnName=phad_city /
mx:DataGridColumn headerText=State
 columnName=phad_state_province /
mx:DataGridColumn headerText=Zip Code
 columnName=phad_postal_code /
 /mx:Array
   /mx:columns
 /mx:DataGrid
 
 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [flexcoders] Hide Datagrid column

2005-04-10 Thread Matt Chotin










If you want a column to not show youll
basically need to specify the other columns (the ones you want to show) manually.
So create DataGridColumn entries for all columns you want and leave off the
primary key.



Matt











From: Valy Sivec
[mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 10, 2005 4:52
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Hide
Datagrid column





Hello flexcoders,

A trivial situation:

Have a datagrid and after selecting a row can
edit/update the selected row via a
pop-up window. I
want that one column of the data grid ( primary
key )
to be hidden, but didn't find how... I need the
primary key in the popup to be able
locateupdate the
source record..

Thanks for your time.
Valy



 
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources
site!
http://smallbusiness.yahoo.com/resources/













Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.