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 654735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:31:36+00:00 2026-05-13T22:31:36+00:00

I have the following tableviewdelegate: private class TableViewDelegate : UITableViewDelegate { private DaysViewController _dvc;

  • 0

I have the following tableviewdelegate:

private class TableViewDelegate : UITableViewDelegate
    {
        private DaysViewController _dvc;
        private List<DateTime> ConferenceDates;
        public TableViewDelegate (DaysViewController controller, List<DateTime> dates)
        {
            _dvc = controller;
            ConferenceDates = dates;
        }



        /// <summary>
        /// If there are subsections in the hierarchy, navigate to those
        /// ASSUMES there are _never_ Categories hanging off the root in the hierarchy
        /// </summary>
        public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
        {
            string date = ConferenceDates[indexPath.Row].ToShortDateString ();
            Console.WriteLine ("DaysViewController:TableViewDelegate.RowSelected: Label=" + date);

                            /*SessionsViewController sessionsView = new SessionsViewController(date);
            sessionsView.Title = date;
            _dvc.NavigationController.PushViewController(sessionsView,true);*/



            EventsViewController eventsView = new EventsViewController (date);

            eventsView.Title = date;
            try {

                _dvc.NavigationController.PushViewController
                (eventsView, true);

            } catch (Exception ex) {
                Log.Error(ex);
            }
        }
    }

which gets added like so:

tableView = new UITableView { 
            Delegate = new TableViewDelegate (this, ConferenceDates), 
            DataSource = new TableViewDataSource (this, ConferenceDates), 
            AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth, 
            BackgroundColor = UIColor.Clear, 
            TableHeaderView = navBar, 
            Frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height) 
        };

It all works well for the UITableView – the data gets loaded etc but whenever I click on a cell to load the child data – _dvc.NavigationController is null

does anyone know where this gets set? or perhaps, if it’s set by the framework – how it might get nulled?

cheers – let me know if i need to post more of the code.

w://

  • 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. Editorial Team
    Editorial Team
    2026-05-13T22:31:37+00:00Added an answer on May 13, 2026 at 10:31 pm

    If you are going to use a navigation controller on a view, you can accomplish this by creating an instance of a UINavigationController and add your view to this controller. Then your view becomes a sub view of the UINavigationController and your view´s NavigationController should now be accessible from within your TableViewDelegate. Present the Navigation controller the you want. In the example below, as a modal view controller.

    tableView = new UITableView { 
                Delegate = new TableViewDelegate (this, ConferenceDates), 
                DataSource = new TableViewDataSource (this, ConferenceDates), 
                AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth, 
                BackgroundColor = UIColor.Clear, 
                TableHeaderView = navBar, 
                Frame = new RectangleF (0, 0, this.View.Frame.Width, this.View.Frame.Height) 
            };
    
    UINavigationController navController = new UINavigationController(tableView);
    navController.ModalTransitionStyle = UIModalTransitionStyle.FlipHorizontal;
    
    this.PresentModalViewController(navController, true);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following code: public class reader extends Activity { WebView mWebView; String mFilename;
I have following design requirements: interface Server {} public class ServerImpl implements Server {}
I have following Java code: import java.io.*; class Global{ public static int a =
I have following plist: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
I have following nested objects. I am using @Valid for validation in my controller.
I have following setup. from django.db import models from django.contrib.auth.models import User class Event(models.Model):
Have following code: public interface ITest { string St1 { get; } } public
I have following class which reads and writes an array of objects from/to a
I have following structure of an HTML document: <body> <div class=main> <div class=left></div> <div
I have following code in html: <div> <div style=float:left;margin:0.5em> <span class=title>Label1</span><br/> <input type=text name=name1

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.