HELLO
MY QUE IS HOW TO RETRIEVE RECORDS FROM GRIDVIEW TO TEXTBOX.USING UNIQIDENTIFIER..IN LINQ..
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Mar 20, 2013, 12:04 AM
hi,
If you are using window base application than it possible to get the data from Grid view.
DataTable dTable = dataGridView1.DataSource as DataTable;
var results = from myRow in dTable .AsEnumerable()("RowNo") == 1("field1"),("field2")
where myRow.Field
select new
{
field1 = p.Field
Field2 = p.Field
};
now you have data table you can write Linq query to find perticular record.
also you can use traditional way for loop.
foreach (DataGridViewRow row in dataGrid.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
string value = cell.Value.ToString();
}
}
hope this will help you.