Disabling Sorting of columns in Tableview

  • Hi,

    When we click on the header of column in a tableview,it gets sorted.
    I want to disable that sorting of columns in tableview.
    Any kind of help will be greatly appreciated.
    Thanks in Advance,
    --
    Brahmendra Kashyap
  • I'd look at NSTableView's setSortDescriptors: method.  Setting to nil
    should do what you want.  To do this on a per column basis you may
    have to pull out each column and set it individually.

    ->Ben
    --
    Ben Lachman
    <lachman...>
    <blachman...>
    740.590.0009

    On Oct 5, 2006, at 1:20 AM, Brahmendra Kashyap wrote:

    > Hi,
    >
    > When we click on the header of column in a tableview,it gets sorted.
    > I want to disable that sorting of columns in tableview.
    > Any kind of help will be greatly appreciated.
    > Thanks in Advance,
    > --
    > Brahmendra Kashyap
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<blachman...>
    >
    > This email sent to <blachman...>
  • Brahmendra,

    If you are using Cocoa bindings with your table view there is a
    checkbox under "value" called "Creates Sort Descriptor."  Removing
    the check for each column where you don't want sort descriptors
    should do the trick.

    On Oct 5, 2006, at 1:39 PM, Ben Lachman wrote:

    > I'd look at NSTableView's setSortDescriptors: method.  Setting to
    > nil should do what you want.  To do this on a per column basis you
    > may have to pull out each column and set it individually.
    >
    > ->Ben
    > --
    > Ben Lachman
    > <lachman...>
    > <blachman...>
    > 740.590.0009
    >
    >
    >
    > On Oct 5, 2006, at 1:20 AM, Brahmendra Kashyap wrote:
    >
    >> Hi,
    >>
    >> When we click on the header of column in a tableview,it gets sorted.
    >> I want to disable that sorting of columns in tableview.
    >> Any kind of help will be greatly appreciated.
    >> Thanks in Advance,
    >> --
    >> Brahmendra Kashyap
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/<blachman...>
    >>
    >> This email sent to <blachman...>
    >
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/robertwalker1%
    > 40mac.com
    >
    > This email sent to <robertwalker1...>

    --
    Robert Walker
    <robertwalker1...>
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today