You could create a class such as UserDirectoryView and take your array as a parameter to the constructor. Additionally, have a UserDirectoryObject[] field that you update whenever the Filter property is set. If you are really concerned with performance, you could decompile the DataView and determine how it's filtering is handled.
-----Original Message----- From: Scott A. Lawrence [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 07, 2004 9:52 AM To: [EMAIL PROTECTED]; Jay Fields Cc: Scott A. Lawrence Subject: Re: Fastest way to add contents of ArrayList to a DataTable Interesting idea on returning an array of UserDirectoryObject. I know you can bind an array to a DataGrid. I know what classes need to be implemented in order to enable sorting on an array of UserDirectoryObject. What I'm not sure of is how I would replicate the row filtering functionality you get automatically with DataView. On Tue, 6 Jan 2004 15:45:31 -0500, Fields, Jay <[EMAIL PROTECTED]> wrote: >I generally add my rows like so: >for (int i=0;i<userList.Count;i++) >{ > tblUsers.Rows.Add(new object[] {user.lastName, user.FirstName}); >} >Also, using a for loop instead of a foreach helps a little. >Additionally, why not have .getUsers() return a UserDirectoryObject[]? >You can bind an array to a DataGrid. >Just some suggestions. >Jay ------------------------------------------------------------ The information contained in this message is confidential proprietary property of Nelnet, Inc. and its affiliated companies (Nelnet) and is intended for the recipient only. Any reproduction, forwarding, or copying without the express permission of Nelnet is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to this e-mail. ------------------------------------------------------------ =================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in: NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls View archives and manage your subscription(s) at http://discuss.develop.com