c# - MonoTouch.Dialog search filter not working properly for MessageElement cells -


i have following code example demonstrate simple monotouch.dialog table using messageelement cells. issue having when enable automatic search feature in dialogviewcontroller. whenever doing search displays blank table.

if replace messageelement cells stingelements cells search works fine.

does there need additional code search messageelement cells properly?

any issue 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);              (int = 0; < 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...";         }     } } 

the source code monotouch.dialog available on github. can see how dialogviewcontroller does it's search (it calls matches methods on element) , how can tweak liking.

in case happens messageelement type not override matches fallbacks the default, element use caption do it's searching.

the quick fix inherit own element messageelement, e.g. mymessageelement, , override matches work like.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -