Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hallo,
I would like to search record in gridview while typing in a textbox without using a button.
I am using update panel, inside the update panel i put the gridview as well as the search textbox.

I have already bind my gridview using dataset as
C#
 protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {            
            updateGrid();            
        }
        
    }
private void updateGrid()
    {
        try
        {
            DataSet ds = stu.GetStudent();
            if (ds.Tables[0].Rows.Count > 0)
            {
                grv_Student.DataSource = ds;
                grv_Student.DataBind();
            }
            else
            {
                grv_Student.DataSource = null;
                grv_Student.DataBind();
            }
        }
        catch (Exception ex)
        {
        }
    }
Posted
Updated 11-Apr-15 3:04am
v2

1 solution

 
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