2 // System.Data.DataRowView.cs
5 // Rodrigo Moya <rodrigo@ximian.com>
6 // Miguel de Icaza <miguel@ximian.com>
7 // Daniel Morgan <danmorg@sc.rr.com>
9 // (C) Ximian, Inc 2002
10 // (C) Daniel Morgan 2002
14 using System.Collections;
15 using System.ComponentModel;
16 using System.Reflection;
21 /// Represents a customized view of a DataRow exposed as a fully featured Windows Forms control.
23 //[DefaultMember("Item")]
24 [DefaultProperty("Item")]
25 public class DataRowView : ICustomTypeDescriptor, IEditableObject, IDataErrorInfo
29 private DataView dataView;
30 private DataRow dataRow;
36 internal DataRowView (DataView dataView, int rowIndex) {
37 this.dataView = dataView;
38 this.dataRow = dataView.Table.Rows[rowIndex];
41 #endregion // Constructors
46 public void BeginEdit ()
48 throw new NotImplementedException ();
52 public void CancelEdit ()
54 throw new NotImplementedException ();
58 public DataView CreateChildView (DataRelation relation)
60 throw new NotImplementedException ();
64 public DataView CreateChildView (string name)
66 throw new NotImplementedException ();
72 throw new NotImplementedException ();
76 public void EndEdit ()
78 throw new NotImplementedException ();
85 public DataView DataView
96 throw new NotImplementedException ();
103 throw new NotImplementedException ();
107 public object this[string column] {
110 DataColumn dc = dataView.Table.Columns[column];
115 DataColumn dc = dataView.Table.Columns[column];
120 public string Error {
122 throw new NotImplementedException ();
126 public object this[int column] {
129 DataColumn dc = dataView.Table.Columns[column];
134 DataColumn dc = dataView.Table.Columns[column];
147 public DataRowVersion RowVersion {
150 throw new NotImplementedException ();
154 #endregion // Properties
156 #region ICustomTypeDescriptor implementations
159 AttributeCollection ICustomTypeDescriptor.GetAttributes ()
161 System.ComponentModel.AttributeCollection attributes;
\r
162 attributes = AttributeCollection.Empty;
\r
164 //object[] attributes = this.GetType ().GetCustomAttributes (true);
165 //AttributeCollection attribCollection;
166 //attribCollection = new AttributeCollection (attributes);
167 //return attribCollection;
171 string ICustomTypeDescriptor.GetClassName ()
177 string ICustomTypeDescriptor.GetComponentName ()
183 TypeConverter ICustomTypeDescriptor.GetConverter ()
189 EventDescriptor ICustomTypeDescriptor.GetDefaultEvent ()
191 throw new NotImplementedException ();
195 PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty ()
201 object ICustomTypeDescriptor.GetEditor (Type editorBaseType)
203 throw new NotImplementedException ();
207 EventDescriptorCollection ICustomTypeDescriptor.GetEvents ()
209 throw new NotImplementedException ();
213 EventDescriptorCollection ICustomTypeDescriptor.GetEvents (Attribute [] attributes)
215 throw new NotImplementedException ();
219 PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties ()
221 ITypedList typedList = (ITypedList) dataView;
222 return typedList.GetItemProperties(new PropertyDescriptor[0]);
226 PropertyDescriptorCollection ICustomTypeDescriptor.GetProperties (Attribute [] attributes)
228 PropertyDescriptorCollection descriptors;
229 descriptors = ((ICustomTypeDescriptor) this).GetProperties ();
230 // TODO: filter out any Attributes not in the attributes array
235 object ICustomTypeDescriptor.GetPropertyOwner (PropertyDescriptor pd)
237 throw new NotImplementedException ();
240 #endregion // ICustomTypeDescriptor implementations
242 #region IDataErrorInfo implementation
244 string IDataErrorInfo.Error {
247 throw new NotImplementedException();
251 string IDataErrorInfo.this[string columnName] {
254 throw new NotImplementedException();
258 #endregion // IDataErrorInfo implementation