Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • Hey John, no the sorting must happen inside the UserControl because the user should not care about that internal process. Just plugin the List<Customer> to the ElementsDataSource , customers are sorted concerning their sortid to be displayed in the UserControl in the proper order! Commented Nov 26, 2010 at 21:23
  • 1
    The sorting would normally be considered an external process if the user control is for the purpose of display. Controls should disply the data provided to them, unless they are changing sort order based on user input: clicking a grid header, for instance. Otherwise, they should just do what they are told to do. Commented Nov 26, 2010 at 21:24
  • Do not agree because => Its a Must-Feature or a part of that control to display the "elements" in that order, which they got added/saved last time, now reloading them again from database. Commented Nov 26, 2010 at 21:27
  • This could be a useful feature if the control is very specific to the business use case. I would still place this sorting feature in a separate piece of business-layer code, which would separate the presentation from the business requirements. Commented Nov 26, 2010 at 21:29
  • Hm... true its business requirement. I will give it more thoughts John, thanks for argueing ;-) but rethink John, this UserControl will be used at 20 places of our application. Should the developer really do 20x sorts on the list and then plug it into the ElementsDataSource? or just plug it and it gets sorted internally ? Commented Nov 26, 2010 at 21:53