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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:46:30+00:00 2026-05-30T23:46:30+00:00

I have the following code example to demonstrate a simple MonoTouch.Dialog table using MessageElement

  • 0

I have the following code example to demonstrate a simple MonoTouch.Dialog table using MessageElement cells. The issue I am having is when I enable the automatic search feature in the DialogViewController. Whenever doing a search it always just displays a blank table.

If I replace the MessageElement cells with just StingElements cells the search works perfectly fine.

Does there need to be some additional code to search the MessageElement cells properly?

Any help with this issue would be greatly appreciated.

using System;
using MonoTouch.UIKit;
using MonoTouch.Dialog;
using MonoTouch.Foundation;

namespace MessageElementSearch
{
    public class MessageTable : DialogViewController
    {
        public MessageTable(RootElement root) : base(root)
        {
            Section sec = new Section();

            root.Add(sec);

            for (int i = 0; i < 10; i++)
            {
                MessageElement me = new MessageElement();

                me.Sender = "Sender " + i.ToString();
                me.Subject = "Subject " + i.ToString();
                me.Body = "Body " + i.ToString();
                me.Date = DateTime.Now;

                sec.Add(me);
            }

            this.Style = UITableViewStyle.Plain;
            this.EnableSearch = true;
            this.SearchPlaceholder = "Filter Table...";
        }
    }
}
  • 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-30T23:46:31+00:00Added an answer on May 30, 2026 at 11:46 pm

    The source code for MonoTouch.Dialog is available on github. From it you can see how DialogViewController does it’s search (it calls the Matches methods on the Element) and how you can tweak it to your liking.

    In your case it happens that the MessageElement type does not override Matches so it fallbacks to the the default, from Element which use the Caption do to it’s searching.

    The quick fix it to inherit your own element from MessageElement, e.g. MyMessageElement, and override Matches to work as you like.

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

Sidebar

Related Questions

I have the following example code: create table #tempmembers ( memberid int ) update
I have the following example code: class A(object): def __init__(self, id): self.myid = id
Say I have the following code: <div onclick='location.href=http://www.example.com/'> <a href='#' onclick='alert(blah)'>click</a> </div> Is there
On a report I have the following code for a field: =Sum([PartQty]*[ModuleQty]) Example results
Say suppose I have the following Java code. public class Example { public static
I have the following code example (see below). My problem is that the tooltip
I have the following example code for the knapsack problem in a file called
I have the following example code: <body> <div id=a></div> <div id=b></div> </body> If I
If i have the following code example: public class ClassBase { public int ID
I have the following code: package example; import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.JFrame; import

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.