Click here to Skip to main content
15,909,051 members
Home / Discussions / C#
   

C#

 
GeneralRe: Beginner array program, need help!!! Pin
cmh62316-Dec-07 18:38
cmh62316-Dec-07 18:38 
QuestionHow to make a http Request in Windows Service +Timer Pin
Narendra Mohan16-Dec-07 17:01
Narendra Mohan16-Dec-07 17:01 
AnswerRe: How to make a http Request in Windows Service +Timer Pin
CKnig16-Dec-07 18:23
CKnig16-Dec-07 18:23 
Questiondetecting a word-wrap event in a TextBox or RichTextBox control ? Pin
BillWoodruff16-Dec-07 1:43
professionalBillWoodruff16-Dec-07 1:43 
GeneralRe: detecting a word-wrap event in a TextBox or RichTextBox control ? [modified] Pin
Anthony Mushrow16-Dec-07 6:07
professionalAnthony Mushrow16-Dec-07 6:07 
GeneralRe: detecting a word-wrap event in a TextBox or RichTextBox control ? Pin
BillWoodruff17-Dec-07 4:05
professionalBillWoodruff17-Dec-07 4:05 
GeneralRe: detecting a word-wrap event in a TextBox or RichTextBox control ? Pin
foxjazzdude12-Dec-09 6:00
foxjazzdude12-Dec-09 6:00 
GeneralEnabling dataGridView sorting for a bound List<t></t> Pin
martin_hughes16-Dec-07 1:23
martin_hughes16-Dec-07 1:23 
I'm after a bit of guidance, here's my story... Smile | :)

For learning purposes I have built a very simple Web Service which returns a List<model></model>, which is a list of models (or model kits - Spitfires, Hurricanes, Mustangs, Naval Ships and etc).

It's very basic, but it works which is good.

I also have a client application I built in VS 2008 - I used the Wizard, and WCF went ahead and did its magic - which is also good, and works.

However, I'd like to enable the column header clicking and sorting in the dataGrdidView against this bound List, which currently is not working. Ideally I want all sorting and whatnot to happen on the client in order to prevent repeated round trips to the web service.

I have a work around which involves using a healthy dose of reflection against the List in order to build a DataTable, which has built in support for sorting and ordering, however I'm not entirely convinced that this is the "right" solution given:

a) I came up with it, so it's bound to be wrong
b) Reflection has a performance overhead (well, not my machine, which is a power house of brute computational force... but you see my point)
c) I'm sure there's a simpler solution which I don't know about

So the question is, how can I enable sorting and ordering against this List without relying on my "workaround". I've had a look in the generated Model class, and it has all manner of dire warnings about changes being lost and so on, so I guess that rules changing that out... any thought?

"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.

"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.


GeneralRe: Enabling dataGridView sorting for a bound List Pin
martin_hughes16-Dec-07 6:37
martin_hughes16-Dec-07 6:37 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
martin_hughes16-Dec-07 10:34
martin_hughes16-Dec-07 10:34 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
Pete O'Hanlon16-Dec-07 11:27
mvePete O'Hanlon16-Dec-07 11:27 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
martin_hughes16-Dec-07 11:41
martin_hughes16-Dec-07 11:41 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
Pete O'Hanlon16-Dec-07 12:20
mvePete O'Hanlon16-Dec-07 12:20 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
martin_hughes16-Dec-07 12:33
martin_hughes16-Dec-07 12:33 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
Pete O'Hanlon17-Dec-07 1:15
mvePete O'Hanlon17-Dec-07 1:15 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
martin_hughes17-Dec-07 4:45
martin_hughes17-Dec-07 4:45 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
Pete O'Hanlon17-Dec-07 8:56
mvePete O'Hanlon17-Dec-07 8:56 
GeneralRe: Enabling dataGridView sorting for a bound List Pin
martin_hughes17-Dec-07 9:50
martin_hughes17-Dec-07 9:50 
GeneralRe: Enabling dataGridView sorting for a bound List [modified] Pin
Pete O'Hanlon17-Dec-07 10:00
mvePete O'Hanlon17-Dec-07 10:00 
QuestionFilepaths on Linux and Windows Pin
Johan Martensson16-Dec-07 1:04
Johan Martensson16-Dec-07 1:04 
GeneralRe: Filepaths on Linux and Windows Pin
Luc Pattyn16-Dec-07 5:14
sitebuilderLuc Pattyn16-Dec-07 5:14 
GeneralRe: Filepaths on Linux and Windows Pin
Johan Martensson16-Dec-07 22:16
Johan Martensson16-Dec-07 22:16 
GeneralRotate Problem Pin
anupamwb15-Dec-07 22:43
anupamwb15-Dec-07 22:43 
GeneralRe: Rotate Problem Pin
Guffa16-Dec-07 0:22
Guffa16-Dec-07 0:22 
GeneralRe: Rotate Problem Pin
anupamwb16-Dec-07 3:58
anupamwb16-Dec-07 3:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.