Procházet zdrojové kódy

2006-12-17 Igor Zelmanovich <[email protected]>

	* FormView.cs: fixed: FillRowDataKey
	* DetailsView.cs: fixed: FillRowDataKey


svn path=/trunk/mcs/; revision=69600
Igor Zelmanovich před 19 roky
rodič
revize
27a1535c7b

+ 6 - 1
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,4 +1,9 @@
-2006-12-11 Igor Zelmanovich <[email protected]>
+2006-12-17 Igor Zelmanovich <[email protected]>
+
+	* FormView.cs: fixed: FillRowDataKey
+	* DetailsView.cs: fixed: FillRowDataKey
+
+2006-12-17 Igor Zelmanovich <[email protected]>
 
 	* TreeView.cs: fixed: ResolveClientUrl used with ImageUrl and NavigateUrl
 

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

@@ -1208,9 +1208,9 @@ namespace System.Web.UI.WebControls
 				PropertyDescriptorCollection props = TypeDescriptor.GetProperties (dataItem);
 				cachedKeyProperties = new PropertyDescriptor [DataKeyNames.Length];
 				for (int n=0; n<DataKeyNames.Length; n++) { 
-					PropertyDescriptor p = props [DataKeyNames[n]];
+					PropertyDescriptor p = props.Find (DataKeyNames [n], true);
 					if (p == null)
-						new InvalidOperationException ("Property '" + DataKeyNames[n] + "' not found in object of type " + dataItem.GetType());
+						throw new InvalidOperationException ("Property '" + DataKeyNames[n] + "' not found in object of type " + dataItem.GetType());
 					cachedKeyProperties [n] = p;
 				}
 			}

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

@@ -1010,9 +1010,9 @@ namespace System.Web.UI.WebControls
 				PropertyDescriptorCollection props = TypeDescriptor.GetProperties (dataItem);
 				cachedKeyProperties = new PropertyDescriptor [DataKeyNames.Length];
 				for (int n=0; n<DataKeyNames.Length; n++) { 
-					PropertyDescriptor p = props [DataKeyNames[n]];
+					PropertyDescriptor p = props.Find (DataKeyNames [n], true);
 					if (p == null)
-						new InvalidOperationException ("Property '" + DataKeyNames[n] + "' not found in object of type " + dataItem.GetType());
+						throw new InvalidOperationException ("Property '" + DataKeyNames[n] + "' not found in object of type " + dataItem.GetType());
 					cachedKeyProperties [n] = p;
 				}
 			}