The question is not tagged with the type of
UI
corresponding to the
Grid control
mentioned in the question.
However, I think a
custom comparer
can be used to sort the items as per requirement.
To illustrate the idea, I have taken an array with the above items and sorted it with a custom comparer as shown below
void Main()
{
string[] items = new [] {"AA","aa","Ab","bb"};
Array.Sort(items, new ItemComparer());
}
public class ItemComparer : IComparer<string> {
public int Compare(string x, string y){
if (char.IsLower(x,0) && char.IsUpper(y,0) )
return -1;
else if (char.IsUpper(x,0) && char.IsLower(y,0))
return 1;
else
return x.CompareTo(y);
}
}
Hope, it may give some clue to implement similar functionality for the problem specified in the question.