Hi Everybody,
I have been doing the asp.net for about a month.
I have a got a datagrid which is paged. As it has got n number of pages. I want to search a row based on the key value and highlight it.
I am able to search and highlight the row if it is on the same page.
OnItemCommand I have this code
Can somebody suggest me how to search the row and go to that page using datagrid.
I have been doing the asp.net for about a month.
I have a got a datagrid which is paged. As it has got n number of pages. I want to search a row based on the key value and highlight it.
I am able to search and highlight the row if it is on the same page.
OnItemCommand I have this code
Code:
t1=(TextBox)(e.Item.FindControl("add_itemCode"));
srchStr=t1.Text;
BindData();
Code:
Binddata()
{
try
{
strConnString = "..";
sqlCon = new SqlConnection(strConnString);
sqlCon.Open();
ds = new DataSet();
dAdapter = new SqlDataAdapter("SELECT ID,ITEM_CODE,ITEM_DESC FROM ITEMMASTER ",sqlCon);
dAdapter.Fill(ds,"IMS_ITEMMASTER");
storeGrid.DataSource = ds;
storeGrid.DataBind();
}
catch(Exception e)
{
Response.Write("Sorry No Data");
}
}
Can somebody suggest me how to search the row and go to that page using datagrid.