Bug 21446 - Using Forms for Android, TableSection(); renders a blank clickable header row; instead of suppressing header row
Summary: Using Forms for Android, TableSection(); renders a blank clickable header row...
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.2
Hardware: PC Windows
: Highest normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-07-18 14:45 UTC by Kent Green [MSFT]
Modified: 2015-12-17 15:59 UTC (History)
12 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Kent Green [MSFT] 2014-07-18 14:45:40 UTC
When using Forms for Android; TableSection() should suppress the display of the header row. 
Instead; the header row is rendered as empty and clickable, having the same effect as TableSection(" ").

===Sample Code to reproduce error===

//Creates blank clickable header
new TableSection (" ") {
	new TextCell { Text = "Text"},

//Should have no header; instead also creates blank clickable header
new TableSection () {
	new TextCell { Text = "Text"}, 

===Additional Info===
Confirmed error using GenyMotion emulator, API lvl 19.
Comment 2 Arpit Jha 2014-08-21 06:08:10 UTC
I have checked this issue and able to reproduce it.

Steps to reproduce this issue

1.Create a Xamarin Forms PCL application.
2.Add code in App.cs  

 public class App
        public static Page GetMainPage()
            return new ContentPage
                Content = new TableView

                    Root = new TableRoot { 
                     new TableSection () {
            new EntryCell { Label="Login", Placeholder = "username" }
            , new EntryCell {Label="Password", Placeholder = "password" }
        new TableSection ("Silent") {
            new SwitchCell {Text = "Vibrate", },
            new ViewCell { View = new Slider() }
        new TableSection ("Ring") {
            new SwitchCell {Text = "New Voice Mail"},
            new SwitchCell {Text = "New Mail", On = true}

3. Run the application.

I observed that  i am able to click on table section header in both cases
 when we are not giving any name or Name empty like TableSection ()  or TableSection ("") 

ScreenCast : http://screencast.com/t/ScfQolEz3D5

Environment Info :

Xamarin Forms Version

Additional Info:
Checked on Emulator API18
Comment 3 Mikael Nensén 2014-11-24 11:54:34 UTC
Same on iOS, you get a blank section header when Intent is not set to TableIntent.Data.
Comment 4 tim.ahrentlov 2014-12-10 06:47:39 UTC
I'm seeing the same problem on Android with 1.3.0 pre2. Could we get a fix on this soon? The problem seems to have haunted us forever: http://forums.xamarin.com/discussion/18037/tablesection-w-out-header
Comment 5 Mikael Nensén 2014-12-10 08:30:17 UTC
When is this going to be fixed? We're shipping a new app during Q1 for iOS and Android and we're still seeing this ugly empty header. I've already gotten feedback from our testers and the customer about it...

I have been able to hide it on iOS by setting a negative padding to the surrounding container, and by "hide" I mean it has been shoved behind another control. This however does not work on Android...

Is there an ETA? Workaround?
Comment 7 Jason Smith [MSFT] 2014-12-12 06:01:55 UTC
For the time being we strongly suggest using ListView. ListView is over the coming months going to cannibalize more and more of the TableView features (being able to add cells directly).

That said, I will poke into the TableView renderer and see what I can't do. Im not promising it for 1.3.0 but hopefully 1.3.1 will be reasonable.
Comment 8 tim.ahrentlov 2014-12-12 06:46:53 UTC
I'm hoping TableView makes it. It's a nice tool for those of us that comes from Monotouch.Dialog and like mtd it's especially useful when making entry forms and menus.
Comment 9 tim.ahrentlov 2014-12-30 08:34:01 UTC
What is the status of this? Can we get a fix soon?
Comment 10 scott 2015-01-07 13:53:51 UTC
We currently took the advice presented in the article below to work around this, but I imagine that could have other effects downstream we wouldn't be happy with.  A fix would be great.  Of course, if TableView is going to be deprecated, that would be good to know too.  (For iOS, we're working around by using TableIntent.Data)

Comment 11 Jason Smith [MSFT] 2015-01-30 04:41:45 UTC
In 1.3.3-pre1 the clickable nature of the headers is resolved, still working on making it discard them (or deciding on the proper behavior really)
Comment 12 Michael 2015-05-19 12:57:29 UTC
I have checked this and confirmed it is fixed in Xamarin.Forms 1.4.2. The empty TableSection header is not shown in the TableView.
Comment 13 sreekanth 2015-07-06 06:49:47 UTC
Issue still exists, I checked with xamarin.Forms 1.4.2
Comment 14 adamhewitt 2015-12-17 15:59:05 UTC
It's not the perfect solution that would be the built-in TableView handling it, but I've suggested an alternate solution to injecting a TextCell renderer here: https://forums.xamarin.com/discussion/18037/tablesection-w-out-header?