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

We have created the functionality when we search on a text-changed occur grid-view should bind on this event ,
I am able to do it for first search but , i have bind as many user search the result should bind in the grid

bind code:
C#
SqlDataAdapter adp = new SqlDataAdapter("select  Countryid ,countryname from tblcountry where Countryid=" + HiddenField1.Value, con);
      DataSet dt = new DataSet();
      adp.Fill(dt);
      gdview.DataSource = dt;
      gdview.DataBind();
Posted
Updated 11-Dec-13 21:12pm
v2
Comments
Karthik_Mahalingam 12-Dec-13 4:31am    
Please add more info to your question.
not clear ..
Jain Nishant 12-Dec-13 5:07am    
Please make it clear. What you want to do??
vivek_2984 12-Dec-13 5:10am    
HI
Thanks for your reply

when ever text searched in text box it should be added in the grid-view with the relevant information

1 solution

Hi You should UnBind before gdview.DataSource = dt;
Try:
gdview.DataSource = null;
Yours Farhad.
 
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