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 record....that'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 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>
 
 
 
 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 : addressVOindexRecord : dgAddress.selectedIndex} );

     addressPopup.centerPopUp(Application.application);
  } 
   } 
 
TIA,
Valy

Matt 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 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 locate&update the
source 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

Reply via email to