[Mono-bugs] [Bug 76106][Nor] New - ItemStyle-HorizontalAlign property no longer recognized for BoundColumn controls within DataGrids

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Sep 14 19:07:41 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by monobug at pelemele.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76106

--- shadow/76106	2005-09-14 19:07:41.000000000 -0400
+++ shadow/76106.tmp.32504	2005-09-14 19:07:41.000000000 -0400
@@ -0,0 +1,125 @@
+Bug#: 76106
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: monobug at pelemele.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ItemStyle-HorizontalAlign property no longer recognized for BoundColumn controls within DataGrids
+
+Description of Problem:
+
+With the 1.1.9 release, the ItemStyle-HorizontalAlign property no longer
+appears to be recognized for BoundColumn controls within DataGrids.  This
+worked in prior mono releases, and works in the m$ .NET 1.1 fw.
+
+
+Steps to reproduce the problem:
+
+Here is an example page that demonstrates the issue:
+
+DataGridTest.aspx
+=================
+
+<%@ Page language="c#" Codebehind="DataGridTest.aspx.cs"
+AutoEventWireup="false" Inherits="HelloMono.DataGridTest" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
+<HTML>
+        <HEAD>
+                <title>DataGridTest</title>
+        </HEAD>
+        <body>
+                <form id="Form1" method="post" runat="server">
+                        <asp:DataGrid id="DataGrid1" runat="server"
+AutoGenerateColumns="False">
+                                <Columns>
+                                        <asp:BoundColumn
+ItemStyle-HorizontalAlign="Center" HeaderText="Column1 23456789"
+DataField="col1"></asp:BoundColumn>                                       
+<asp:BoundColumn ItemStyle-HorizontalAlign="Left" HeaderText="Column2
+34567891" DataField="col2"></asp:BoundColumn>
+                                </Columns>
+                        </asp:DataGrid>
+                </form>
+        </body>
+</HTML>
+
+DataGridTest.aspx.cs
+====================
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Web;
+using System.Web.SessionState;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using System.Web.UI.HtmlControls;
+
+namespace HelloMono
+{
+
+        public class DataGridTest : System.Web.UI.Page
+        {
+                protected System.Web.UI.WebControls.DataGrid DataGrid1;
+
+                private void Page_Load(object sender, System.EventArgs e)
+                {
+                        DataTable dt = new DataTable();
+                        dt.Columns.Add("col1");
+                        dt.Columns.Add("col2");
+                        DataRow dr = dt.NewRow();
+                        dt.Rows.Add(dr);
+                        dt.Rows[0]["col1"] = "Center";
+                        dt.Rows[0]["col2"] = "Left";
+                        DataGrid1.DataSource = dt.DefaultView;
+                        DataGrid1.DataBind();
+                }
+
+
+                override protected void OnInit(EventArgs e)
+                {
+
+                        InitializeComponent();
+                        base.OnInit(e);
+                }
+
+
+                private void InitializeComponent()
+                {
+                        this.Load += new System.EventHandler(this.Page_Load);
+
+                }
+
+        }
+}
+
+
+
+Actual Results:
+
+In the above example, the word "Center" should be centered in the first column.
+
+Expected Results:
+
+The word "Center" is left justified in the first column.
+
+
+How often does this happen? 
+
+Always.
+
+Additional Information:
+
+Please let me know if you need any additional info.


More information about the mono-bugs mailing list