below code is what I used to get the ids from datagrid and store to string.
however, if I filter the datagrid using this code.still giving me all the ids. how can I modified this code to return only what is visible in datagrid during filtering.
DataTable dtable = (DataTable)this.dataGridView1.DataSource;
Dv = new DataView(dtable);
foreach (DataRowView drv in Dv)
{
s.Add(drv["Ids"].ToString());
}