string ITypedList.GetListName(PropertyDescriptor[] listAccessors) { System.Data.DataSet dataSet = this.DataSet; if (dataSet == null) { throw ExceptionBuilder.CanNotUseDataViewManager(); } if ((listAccessors == null) || (listAccessors.Length == 0)) { return(dataSet.DataSetName); } DataTable table = dataSet.FindTable(null, listAccessors, 0); if (table != null) { return(table.TableName); } return(string.Empty); }
PropertyDescriptorCollection ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors) { System.Data.DataSet dataSet = this.DataSet; if (dataSet == null) { throw ExceptionBuilder.CanNotUseDataViewManager(); } if ((listAccessors == null) || (listAccessors.Length == 0)) { return(((ICustomTypeDescriptor) new DataViewManagerListItemTypeDescriptor(this)).GetProperties()); } DataTable table = dataSet.FindTable(null, listAccessors, 0); if (table != null) { return(table.GetPropertyDescriptorCollection(null)); } return(new PropertyDescriptorCollection(null)); }