Click here to Skip to main content
15,909,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,

I tried to show list of name on cmbobox


this is the code(query
var query = (from p in dbhome.Stores select new { p.FNameware,p.id }).ToList();
Cbox.DataSource = query.ToList();

http://www.axofile.com/images/8uz5jckujlltw9ksva.gif[^]
Posted
Updated 8-Mar-13 19:23pm
v4
Comments
Andreas Gieriet 9-Mar-13 1:10am    
And what is the problem?
Checkout for duplicate ToList calls...
Andi
saeed1364 9-Mar-13 1:25am    
updates questions
Andreas Gieriet 9-Mar-13 1:29am    
As I said: check out for the duplicate ToList call!
Or to say it bluntly: remove the second ToList call!
Andi
PS: See also CBox.DisplayMember property...
Karthik Harve 9-Mar-13 1:24am    
what is the problem in that query ? any error ?
saeed1364 9-Mar-13 1:25am    
update questions

 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900