|
 |
 |
 |
|
|
|
|
|
|
|
Is it possible to sort using EuroWise and a datagridview?
Last Post 14 Nov 2008 02:19 PM by Khadaji. 4 Replies.
|
Sort:
|
|
Prev Next |
You are not authorized to post a reply. |
|
Khadaji
 New Member Posts:18
 |
| 02 Nov 2008 10:55 PM |
|
I have a table that I would like to be able to sort by date. Is it possible to do this? |
|
|
|
|
JoncEIT
 New Member Posts:9
 |
| 03 Nov 2008 11:32 AM |
|
In approximatively the same way, i have a problem. I want to able sort my searchResultDataGridView when users click on header Collumn. (for each collumn, String, Guid, Date, int) How can i do that ? thanks for your time, and please apologize my english (again, i'm belgian) |
|
|
|
|
Khadaji
 New Member Posts:18
 |
| 03 Nov 2008 02:00 PM |
|
| JoncEIT, that is exactly what I want to do too - and your English if fine. :-) |
|
|
|
|
JoncEIT
 New Member Posts:9
 |
| 03 Nov 2008 03:39 PM |
|
I'm working on a solution, using reflection ... but i hope there is an easier way ;) The idea is to build some "generic fonction" (sort by string, guid, int , datetime) based on (for string here) private List<BLCompanyInfo> insertRightPlace(String toCompare) { BLCompanyInfoList listCompany = BLCompanyInfoList.GetBLCompanyInfoList(); List<BLCompanyInfo> toReturn = new List<BLCompanyInfo>(); Boolean addOrNot = false; foreach (BLCompanyInfo infoC in listCompany) { if (toReturn.Count == 0) { toReturn.Add(infoC); } else { addOrNot = false; while (!addOrNot) { foreach (BLCompanyInfo infoCC in toReturn) { if (infoC.CompanyName.CompareTo(infoCC.CompanyName) < 0 && !(toReturn.Contains(infoC))) { addOrNot = true; if (toReturn.IndexOf(infoCC) != 0) { toReturn.Insert(toReturn.IndexOf(infoCC), infoC); break; } else { toReturn.Insert(0, infoC); break; } } } if (!addOrNot) { toReturn.Add(infoC); addOrNot = true; } } } } return toReturn; } i mean by generic : in the arguments of the method, one string for the blObject, one for the collumn... So the method could replace for example BLCompany by BLContact and CompanyName by ContactName |
|
|
|
|
Khadaji
 New Member Posts:18
 |
| 14 Nov 2008 02:19 PM |
|
| Should I take the lack of replies as a negative answer? May I assume that I cannot sort using a datagridview and code produced by Eurowise? |
|
|
|
|
| You are not authorized to post a reply. |
|
Active Forums 4.0
|
|
|
|
|
|
|
|
|
|
 |
|
|
|
|