Click here to Skip to main content
15,908,264 members
Home / Discussions / C#
   

C#

 
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 
After 3 hours and 11 minutes I think I've finally understood what's going on in your example...

The first thing that threw me was "LambdaExpression le = Expression.Lambda(me, "CompanyName");" as the compiler wanted a parameter expression rather than a string passing in - easily fixed.

The real head scratcher, however, was "c" (as in c.ElementType and c.Provider.CreateQuery(mce)) - what the heck was c? The compiler sure didn't know, and wasn't offering much help either. It occurred to me to wonder what the IQueryable queried was expecting to be filled with, and learned that I needed a set of data, in my case a List of models, AsQueryable. Success!

One question remains which I've not been able to answer...

I take it IQueryable queried actually holds all of the results of the query, however when i try to cast it back to a List < Model >, I end up with an empty list... what am I doing wrong?

"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
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 
AnswerRe: Rotate Problem Pin
techieboi16-Dec-07 17:00
techieboi16-Dec-07 17:00 
GeneralCatch Mouse Event Pin
Sabry190515-Dec-07 22:05
Sabry190515-Dec-07 22:05 
GeneralRe: Catch Mouse Event Pin
Y_R16-Dec-07 5:53
Y_R16-Dec-07 5:53 
QuestionHelp me to design a user form maker! Pin
arefkarimi15-Dec-07 19:12
arefkarimi15-Dec-07 19:12 
GeneralRe: Help me to design a user form maker! Pin
GuyThiebaut16-Dec-07 6:49
professionalGuyThiebaut16-Dec-07 6:49 
GeneralRe: Help me to design a user form maker! Pin
arefkarimi16-Dec-07 18:41
arefkarimi16-Dec-07 18:41 
GeneralRe: Help me to design a user form maker! Pin
GuyThiebaut16-Dec-07 22:40
professionalGuyThiebaut16-Dec-07 22:40 
GeneralDelayed Clipboard rendering Pin
peterchen15-Dec-07 17:40
peterchen15-Dec-07 17:40 

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.