At last I get a solution how to display selected row data in listview or datagridview. Here I used listview to display and used a textbox for compare data with access database and also a button to search.
private void button_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
DataSet ds = new DataSet();
ds.Tables.Add(dt);
OleDbDataAdapter da = new OleDbDataAdapter("select * from table", vcon);
da.Fill(dt);
foreach (DataRow myRow in dt.Rows)
{
for (int x = 0; x {
string name = dt.Rows[x].ItemArray.GetValue(1).ToString();
if (name == textbox1.text)
{
MessageBox.Show("Found");
}
else
{
MessageBox.Show("No");
}
}
}
}
Hopefully it would be really greateful solution. Thanks to all.