Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
code for simple dictionary in vb.net
Which controls needed while creating dictionary
Posted
Updated 21-Feb-11 2:35am
v4
Comments
Sandeep Mewara 21-Feb-11 3:23am    
You are asking anything or telling us?

Further, where are you stuck?
Albin Abel 21-Feb-11 3:35am    
why you need a grid view to simply display a list?
Once you type A, you are retrieving all the records starts with A or limit to 10 or something like that?. if you are retrieving all A (not recommended, however) then subsequent queries no need to connect database. You can use linQ for querying the list you are retrieving with the start letter
samir 2011 21-Feb-11 8:25am    
no limit i just need like dictionary....is it possible to use grid view to display word ??
Sunasara Imdadhusen 21-Feb-11 6:19am    
Do you have any problem?

I wouldn't really recommend doing this with a GridView and a textbox: it will get extremely slow to react when the dictionary gets large (as you either have to reload the GridView from the server when the key is pressed, or load the entire dictionary into the javascript at page load).

What is wrong with an autocomplete textbox associated with a dictionary?
 
Share this answer
 
If you are asking about what class to use, then the standard dictionary class in .NET is Dictionary<>.

See http://msdn.microsoft.com/en-us/library/xfhwa508.aspx[^]

And as to what control to use to display it, that depends on what you want to do. It could be as simple as two text boxes, where the user types into one text box, and the other text box updates with the matching value. You just handle the text box change event in the first text box.

Alternatively, if you want to display the entire dictionary (and it's not too large that that's not practical), then you could use anything from a simple ListBox to a ListView, or even a grid control.
 
Share this answer
 
use If conditions. But it will be lengthy when considering uppercase and lowercase.
 
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