Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i have two text boxes....CityCode,CityName

Data is..CityCode(A001,A002,A003...B001,B002,C001,C002...) like that..

what i want is ,when i type 'A' in citycode textbox,all the city codes that starts with 'A' should come in pop up window(DataGridview)...please help me..
Posted
Updated 21-Mar-12 1:12am
v2
Comments
pietvredeveld 21-Mar-12 7:59am    
Can you please tell any thing about you're environment (asp.net / MVC / WPF / WIN32 )
DileepkumarReddy 21-Mar-12 8:05am    
VB.NET,IDE(Microsoft visual studio ),WIN32

Hi,
Add this query in Textbox_Textchanged Event and populate the DataGridView-
Declare one Dataset Object

Dim da as OleDbDataAdapter("Select * from Table where CityCode like '"& TextBox1.Text &"%'", Connection)

da.Fill(ds,"TableName")
DataGridView.DataSource=ds.Tables(0)



Thanks
 
Share this answer
 
Comments
DileepkumarReddy 21-Mar-12 8:52am    
Actually i am using client server application...so everytime i type ,i need to send the request to server,is there any way to request once and store it in datatable and then can we fetch from datatable..
Jαved 21-Mar-12 9:46am    
It is using disconnected architecture so it does your reqirement.
killerqx1 25-Mar-12 22:37pm    
exactly using Text_Textchanged Event you can solved it!
Jαved 26-Mar-12 8:28am    
Yes you are right.
use this Textbox_Textchanged Event so that as u go on typing u will get displayd
 
Share this answer
 
Comments
DileepkumarReddy 21-Mar-12 9:12am    
Actually i am using client server application...so everytime i type ,i need to send the request to server,is there any way to request once and store it in datatable and then can we fetch from datatable..

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