I've a textbox and gridview in a from. in gridview i've loaded some data from sql. now I've a function in c sharp for search method. (ie)
public void search()
{
SqlDataAdapter da = new SqlDataAdapter( "select * from mast_bloodgroup 2 where bloodgroup like'" + txtbldgrp.Text+ " % '", con);
DataSet ds = new DataSet();
da.Fill(ds);
grdbldgrp.DataS ource = ds;
grdbldgrp.DataB ind();
}
so when i type a letter and pressing enter button in that textbox.. the particular data shoulb be displayed in gridveiw which are data start with the letter that i typed in textbox
public void search()
{
SqlDataAdapter da = new SqlDataAdapter( "select * from mast_bloodgroup 2 where bloodgroup like'" + txtbldgrp.Text+ " % '", con);
DataSet ds = new DataSet();
da.Fill(ds);
grdbldgrp.DataS ource = ds;
grdbldgrp.DataB ind();
}
so when i type a letter and pressing enter button in that textbox.. the particular data shoulb be displayed in gridveiw which are data start with the letter that i typed in textbox
Comment