Re: character string matches a speified patern(LIKE 'c%' )in DataV
From: Shameer CK (shameerck_at_gmail.com)
Date: 10/12/04
- Next message: Eric Renken: "Re: how to select or update data when column name has space"
- Previous message: Sijin Joseph: "Re: Sorting a Dataview and Finding"
- In reply to: Techstudent: "Re: character string matches a speified patern(LIKE 'c%' )in DataV"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 21:21:05 -0700
Try This.
DataView1 is a dataview filled with data
txtSearch is the textbox containing string to search for
DataGrid1 is the datagrid to which the DataView1 is attached
DataView1.Sort="FieldName";
//"FieldName" is the field in which the search will take place
int i=DataView1.Find(cmbSearch.Text);
if(i>DataView1.Table.Rows.Count || i<0)
{
MessageBox.Show("Record Not Found.");
}
else
{
DataGrid1.CurrentCell=new DataGridCell(i,1) ;
}
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
- Next message: Eric Renken: "Re: how to select or update data when column name has space"
- Previous message: Sijin Joseph: "Re: Sorting a Dataview and Finding"
- In reply to: Techstudent: "Re: character string matches a speified patern(LIKE 'c%' )in DataV"
- Messages sorted by: [ date ] [ thread ]