Hello,
I am trying to sort a dropbox for a ListGridField in alphabetical order. The code below sorts by the ascii value, which makes all lower case letters come after uppercase letters. Is there anyway to make the sort case-insensitive?
Example sort:
What I'm getting now: ("AJ", "Ab", "Be", "Gi", "Zh", "bo")
What I need: ("Ab", "AJ", "Be", "bo", "Gi", "Zh")
SmartClient Version: v8.3p_2013-04-15/Enterprise Deployment (built 2013-04-15)
Firefox 20.0.1
I am trying to sort a dropbox for a ListGridField in alphabetical order. The code below sorts by the ascii value, which makes all lower case letters come after uppercase letters. Is there anyway to make the sort case-insensitive?
Example sort:
What I'm getting now: ("AJ", "Ab", "Be", "Gi", "Zh", "bo")
What I need: ("Ab", "AJ", "Be", "bo", "Gi", "Zh")
Code:
DataSource aDS = DataSource.get("aDatasource");
SortSpecifier[] sortSpecifiers = {new SortSpecifier("name", SortDirection.ASCENDING)};
DSRequest dsr = new DSRequest();
dsr.setSortBy(sortSpecifiers);
ListGridField user= new ListGridField("user", "Created by");
user.setOptionDataSource(aDS);
user.setOptionFilterContext(dsr);
user.setValueField("userName");
user.setDisplayField("name");
Firefox 20.0.1
Comment