Bug 23152 - Issues using columns in GridView
Summary: Issues using columns in GridView
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.2.3
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-09-18 10:57 UTC by Dominic N [MSFT]
Modified: 2014-09-23 05:55 UTC (History)
6 users (show)

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


Attachments
Test Project from Customer (4.96 MB, application/zip)
2014-09-18 10:57 UTC, Dominic N [MSFT]
Details
Screencaps from customer. (32.06 KB, application/zip)
2014-09-18 10:58 UTC, Dominic N [MSFT]
Details
Test project (5.78 MB, application/x-zip-compressed)
2014-09-18 11:54 UTC, Yuri
Details


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:
Status:
RESOLVED FIXED

Description Dominic N [MSFT] 2014-09-18 10:57:42 UTC
Created attachment 8104 [details]
Test Project from Customer

We have a report of an issue related to columns in GridView. This is related to case https://xamarin.desk.com/agent/case/88195

This occurred after encountering this bug with the same customer: https://bugzilla.xamarin.com/show_bug.cgi?id=22950
This link is for versioning information and the sake of organization only. The bugs are not related.

Sample provided by customer is attached. Android and iOS do not match screenshot provided. We assume the WinPhone version was the only version changed. If this is not the case, we will request an updated sample.


## Customer report 

Screenshots sent by the customer are attached in zip file.

Customer didn't test in iOS, but it mirrors what I see in Android. I have been unable to test in WinPhone. Proposed issues:

1. When type is GridLength.Auto or Star the "value" should be ignored but when I put 0 I get an exception.
Width = new GridLength(0, GridUnitType.Auto)

2. With the code below, the customer expects the image named "expected". Instead, he sees the image named "actual". He wants to put all three labels in the right corner, and his goal is the image "goal". All three images are in the Screencaps.zip file.


## Associated code:

class FrameHeader : Grid
{
Label dbStatus, gpsStatus, operaionStatus;

public FrameHeader()
{
//Padding = new Thickness(20, 0);
//HorizontalOptions = LayoutOptions.FillAndExpand;
//ColumnSpacing = 20;

RowDefinitions = new RowDefinitionCollection
{
new RowDefinition { Height = GridLength.Auto },
new RowDefinition { Height = GridLength.Auto },
};
ColumnDefinitions = new ColumnDefinitionCollection
{
new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) },
new ColumnDefinition { Width = new GridLength(1, GridUnitType.Auto) },
new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }
};

Children.Add(operaionStatus = new Label
{
Text = "Operation Status",
HorizontalOptions = LayoutOptions.Center,
Font = Font.SystemFontOfSize(24),
}, 0, 0);
Grid.SetColumnSpan(operaionStatus, 3);

Children.Add(dbStatus = new Label
{
Text = "DB",
//HorizontalOptions = LayoutOptions.EndAndExpand,
//Font = Font.SystemFontOfSize(24),
BackgroundColor = Color.Red
}, 0, 1);

Children.Add(gpsStatus = new Label
{
Text = "GPS",
//HorizontalOptions = LayoutOptions.End,
//Font = Font.SystemFontOfSize(24),
BackgroundColor = Color.Red
}, 1, 1);

Children.Add(gpsStatus = new Label
{
Text = "WEB",
//HorizontalOptions = LayoutOptions.End,
//Font = Font.SystemFontOfSize(24),
BackgroundColor = Color.Red
}, 2, 1);



}
}


## My Build Information

=== Xamarin Studio ===

Version 5.4 (build 239)
Installation UUID: ee07b9c8-41e3-496f-a1ab-e8a3ed3db20f
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: 1.11.0.1 (Business Edition)

=== Xamarin.Android ===

Version: 4.17.0 (Business Edition)
Android SDK: /Users/dominicnahous/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.iOS ===

Version: 8.0.0.60 (Business Edition)
Hash: b26679f
Branch: 
Build date: 2014-09-16 12:47:14-0400

=== Build Information ===

Release ID: 504000239
Git revision: 338110385bb89c5774e89ffcb15d8f2039e7fbcd
Build date: 2014-09-16 12:25:53-04
Xamarin addins: 05241f5ab70cf79388a0f113bc6877780ed1024a

=== Operating System ===

Mac OS X 10.9.4
Darwin Dominics-MacBook-Pro.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 1 Dominic N [MSFT] 2014-09-18 10:58:22 UTC
Created attachment 8105 [details]
Screencaps from customer.
Comment 2 Yuri 2014-09-18 11:36:05 UTC
I think there was a confusion as I reported 2 bugs. The screenshots are related to Grid and code in the bug is correct too but the attached project is for another bug for relative layout where Constraints are not calculated properly. Please use code in the bug but not attached project.
Comment 3 Dominic N [MSFT] 2014-09-18 11:40:51 UTC
Thank you Yuri. I have marked said project as obsolete.

If you do have a project file we can use to run tests on the issue in this report and would like to upload that here, it would be highly useful! Thanks!
Comment 4 Yuri 2014-09-18 11:54:28 UTC
Created attachment 8107 [details]
Test project
Comment 5 Jason Smith [MSFT] 2014-09-23 05:55:10 UTC
Fix in next release