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*
- 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!Elisabeth– Elisabeth2010-11-26 21:23:14 +00:00Commented Nov 26, 2010 at 21:23
- 1The 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.John Saunders– John Saunders2010-11-26 21:24:46 +00:00Commented 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.Elisabeth– Elisabeth2010-11-26 21:27:16 +00:00Commented 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.John Saunders– John Saunders2010-11-26 21:29:51 +00:00Commented 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 ?Elisabeth– Elisabeth2010-11-26 21:53:27 +00:00Commented Nov 26, 2010 at 21:53
| Show 3 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. python-3.x), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-cs