Browse Source

2005-11-18 Gonzalo Paniagua Javier <[email protected]>

	* DataGrid.cs: use TableHeaderCell instead of TableCell for headers when
	UseAccesibleHeader property is true. Patch by Robert Jordan.


svn path=/trunk/mcs/; revision=53244
Gonzalo Paniagua Javier 20 years ago
parent
commit
ffac0a0ef3

+ 5 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,8 @@
+2005-11-18 Gonzalo Paniagua Javier <[email protected]>
+
+	* DataGrid.cs: use TableHeaderCell instead of TableCell for headers when
+	UseAccesibleHeader property is true. Patch by Robert Jordan.
+
 2005-11-18 Gonzalo Paniagua Javier <[email protected]>
 
 	* BaseValidator.cs: 'controltovalidate' must be the ClientID of the

+ 2 - 1
mcs/class/System.Web/System.Web.UI.WebControls/DataGrid.cs

@@ -701,8 +701,9 @@ namespace System.Web.UI.WebControls {
 
 		protected virtual void InitializeItem (DataGridItem item, DataGridColumn [] columns)
 		{
+			bool th = UseAccessibleHeader && item.ItemType == ListItemType.Header;
 			for (int i = 0; i < columns.Length; i++) {
-				TableCell cell  = new TableCell ();
+				TableCell cell = (th) ? new TableHeaderCell () : new TableCell ();
 				columns [i].InitializeCell (cell, i, item.ItemType);
 				item.Cells.Add (cell);
 			}