Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Lpt EntityDefinition.Fields sorted always alphabetically
 

Pages: 1
Bugs & Issues
Lpt EntityDefinition.Fields sorted always alphabetically
Page:1/1 

  Print all messages in this thread  
Poster Message
raist
User



Location:
Madrid, Spain
Joined on:
19-Apr-2010 23:57:10
Posted:
114 posts
# Posted on: 18-Apr-2012 17:26:14.  
v3.5 March 30th, 2012
It happens with .Fields in EntityDefinion, TypedListDefinition and TypedViewDefinition objects,
in spite of any Field Order set in the Designer for that class
Code:
// usage example
EntityDefinition currentEntity
foreach(var field in currentEntity.Fields)
{
// always in alphabetical order.
// currentEntity.Fields.IsSorted is false
}


Is it a settings issue? It didn't happend with v.3.1

Regards,

Jose
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14641 posts
# Posted on: 18-Apr-2012 19:08:36.  
Have you checked this:
Field Ordering


  Top
raist
User



Location:
Madrid, Spain
Joined on:
19-Apr-2010 23:57:10
Posted:
114 posts
# Posted on: 18-Apr-2012 20:21:27.  
Ummm... That's what I'm trying to say.
I have already set the field order in entity editor, but it's useless.
I tried selfserving.
I'll check the UseCustomField... & ResetFieldOrder... settings, but I'm pretty sure they have default values as I have tried on three different projects and +10 elements (entities, tview & tList)
Weird?
Regards,
Jose Confused
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8150 posts
# Posted on: 19-Apr-2012 07:42:10.  
Hi Jose. Try this:
Code:
return currentEntity.GetAllFieldsInElement(true, false);


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
raist
User



Location:
Madrid, Spain
Joined on:
19-Apr-2010 23:57:10
Posted:
114 posts
# Posted on: 19-Apr-2012 10:01:28.  
That's it!!!
Code:
// User defined or (default) alphabetical order
currentEntity.GetAllFieldsInElement(true, false);

instead of
Code:
// Always alphabetical order
currentEntity.Fields;

Thanks both for keeping up to your standards Laugh
  Top
raist
User



Location:
Madrid, Spain
Joined on:
19-Apr-2010 23:57:10
Posted:
114 posts
# Posted on: 19-Apr-2012 13:41:12.  
Updated & closed.
To get the sorted list of fields, the right function calls are:
Code:
currentEntity.GetAllFieldsInElement(true, false);
currentTypedView.GetAllFieldsInElement(true, false);
currentTypedList.Fields;
// currentTypedList.GetAllPotentialTypedListFields() gets them in alphabetical order

Regards,

Jose


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.