Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 58233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:48:57+00:00 2026-05-10T17:48:57+00:00

I want to dynamically hide/show some of the columns in a NSTableView, based on

  • 0

I want to dynamically hide/show some of the columns in a NSTableView, based on the data that is going to be displayed – basically, if a column is empty I’d like the column to be hidden. I’m currently populating the table with a controller class as the delegate for the table.

Any ideas? I see that I can set the column hidden in Interface Builder, however there doesn’t seem to be a good time to go through the columns and check if they are empty or not, since there doesn’t seem to be a method that is called before/after all of the data in the table is populated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:48:58+00:00Added an answer on May 10, 2026 at 5:48 pm

    A NSTable is just the class that paints the table. As you said yourself, you have some class you give the table as delegate and this class feeds the table with the data to display. If you store the table data as NSArray’s within your delegate class, it should be easy to find out if one column is empty, isn’t it? And NSArray asks your class via delegate method how many columns there are, so when you are asked, why not looking for how many columns you have data and report that number instead of the real number of columns you store internally and then when being asked for providing the data for (column,row), just skip the empty column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have used setColumns function to show/hide columns dynamically on client-side. now i want
I want to dynamically hide/show controls in an activity based on a button touch
I have used setColumns function to show/hide columns dynamically on client-side. Now I want
I want to dynamically change the data-href for the fb comments plugin below based
I want to attach (show/hide text) dynamically to a span and when clicked on
I have an anchor tag. I want to hide/show it dynamically. I can't put
If I want to dynamically show or hide several User Controls. Would it be
I need to hide/show parts of a table that is dynamically built, as shown
I want to dynamically add threading.Thread classes to a thread queue based on a
I have some JQuery code that shows or hides a div. $(div#extraControls).show(); // OR

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.