![]() |
|
[C#] How to associate the result of a LINQ query with the dataSource of a dataGridView - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] How to associate the result of a LINQ query with the dataSource of a dataGridView (/showthread.php?tid=6097462) |
How to associate the result of a LINQ query with the dataSource of a dataGridView - Nemo2478 - Jul 24, 2020 Hello everybody, I have a dataGridView with the result of a query, this dataGridView allows me to select the records I want: Code private void button1_Click(object sender, EventArgs e)The idea is to associate the result of this query in the grid of the frmResult form, but I don't know with what type of data to collect and associate it to the dataSource of the dataGridView. The frmResult: Code public partial class frmResult : FormWaiting for the result of the Select as a generic object type as it is in the code is the closest I've ever been to working, but I don't know what data type to put the result in to make it work. Can you please help me? Regards and thanks RE: How to associate the result of a LINQ query with the dataSource of a dataGridView - glitchgxd - Jul 25, 2020 Can't you just set the RowFilter to something like- Code dataView.RowFilter = "colCheck = true";Instead of building out that linq query? |