Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find a row in Datagrid and display the page in which it is located.

Status
Not open for further replies.

rangaks17

Programmer
Dec 5, 2003
5
IN
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
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top