HELLO
MY QUE IS HOW TO RETRIEVE RECORDS FROM GRIDVIEW TO TEXTBOX.USING UNIQIDENTIFIER..IN LINQ..
LINQ
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 19, 2013, 8:04 PM EDT
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.