• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Programmatically selecting column header cell and triggering a sort
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically selecting column header cell and triggering a sort


  • Subject: Re: Programmatically selecting column header cell and triggering a sort
  • From: Andrew Merenbach <email@hidden>
  • Date: Sun, 19 Aug 2007 08:20:46 -0700

Hi, Alex,

If you're using bindings, you may wish to use -setSortDescriptors: on either the table view or, if it is bound to an array controller, on the array controller to which it is bound. With the array controller, you'll want to take the key of the sort descriptor from the name of the bound key (for instance, if you have bound a column of your table view to "[myArrayController].arrangedObjects.penguin", you'll want to set the sort descriptor to have the key "penguin").

Cheers,
	Andrew

On Aug 18, 2007, at 11:49 PM, Alex Reynolds wrote:

I have used the following call to select the column header cell of my table view:

[myTableView selectColumn:0 byExtendingSelection:NO];

This indeed selects the column header, but does not trigger a sort of the data in the table view, based on this column.

Is there a way to programmatically trigger a sort of the data in the table view?

Regards,
Alex

----------------------------------------------------------------------
Alex Reynolds, M. Biot.
217 Leidy Building / 6013
Department of Biology
University of Pennsylvania
Philadelphia, PA 19104

V: +1 215 573.2818
F: +1 215 898.8780
E: mailto:email@hidden
W: http://www.bio.upenn.edu/computing/

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Programmatically selecting column header cell and triggering a sort
      • From: Alex Reynolds <email@hidden>
References: 
 >Programmatically selecting column header cell and triggering a sort (From: Alex Reynolds <email@hidden>)

  • Prev by Date: Re: Is this a bug of InterfaceBuilder?
  • Next by Date: Re: Is this a bug of InterfaceBuilder?
  • Previous by thread: Programmatically selecting column header cell and triggering a sort
  • Next by thread: Re: Programmatically selecting column header cell and triggering a sort
  • Index(es):
    • Date
    • Thread