First of all, > jumbled column order (i.e: col3, col2, col5, col1, col4)
I assume you mean row? IList can be sort using custom sorting (IList.Sort) similar to the IComparer overload in datagridview: http://www.devolutions.net/articles/DataGridViewFAQ.htm#_Toc119903466 Or you can even take a step further and created custom dynamic sorting solution for business object. My example here: http://www.noogen.org/share/ibatisnet/sorting/ http://www.noogen.org/share/ibatisnet/sorting/SortDescription.cs http://www.noogen.org/share/ibatisnet/sorting/SortComparer.cs If you don't like object probe, you can implement some kind of member accessor interface on your object for custom sorting: http://www.noogen.org/share/ibatisnet/sorting/IMemberAccessor.cs Usage: List<Person> listToSort = new List<Person>(); // Fill(listToSort): listToSort.Sort( new SortComparer<Person>("LastName ASC, FirstName DESC") ); Regards, Tom Nguyen Sr. Developer [EMAIL PROTECTED] -----Original Message----- From: Nandaka2 [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 12, 2007 11:11 AM To: [email protected] Subject: using DataGridView Hello. I'm new with iBatisNet and C# proggramming here, so please guide me. I'm using iBatis DataMapper 1.6.1 and C# .Net 2.0. I want to ask how to use iBatis with DataGridView in C#. If I assign DataGrid/DataGridView.DataSource with IList QueryForList, I got jumbled column order(i.e: col3, col2, col5, col1, col4) and the result row cant be sorted. If I iterate the list(using for(;;)) and printed it to console, the order is right like in resultMap. But if I'm using the manual way(.Net docs dataAdapter and DataTable) I got it right. Is it possible to get DataTable from iBatis? thank you. Adi Irawan ------------------------------------------------------------------------ --- Bosan dengan email yang biasa ?? Ayo cobain kirim email diiringi musik dengan bergabung di Music Mail Plasa.com ( http://www.plasa.com/informasi/mm/ ), dijamin kirim email terasa lebih menyenangkan. ------------------------------------------------------------------------ --- ************************************************************************************ This e-mail message and any files transmitted herewith, are intended solely for the use of the individual(s) addressed and may contain confidential, proprietary or privileged information. If you are not the addressee indicated in this message (or responsible for delivery of this message to such person) you may not review, use, disclose or distribute this message or any files transmitted herewith. If you receive this message in error, please contact the sender by reply e-mail and delete this message and all copies of it from your system. ************************************************************************************

