Is it possible to search for Values in DataGridview with Linq?
is it possible to search for cells values in Cells of a DataGridView using Linq. My target is to search values in a DataGridView without loops.
is it possible to search for cells values in Cells of a DataGridView using Linq. My target is to search values in a DataGridView without loops.
You would be able to Search through its data source but not the DataGridView class itself.
Regards,
Saurabh Nandu
www.MasterCSharp.com
RowType could take a dataGridView row and reference it internally, its properties accessing it:
class RowType
{
private readonly DataGridViewRow _row;
public RowType(DataGridViewRow row)
{
this._row = row;
}
public string Name { get { ... fetch the Name data from the row ... } }
}
This should be able to give you access to the data grid view via LINQ, and still maintain at least an illusion of type safety.
You could also use this as a means to petition for a strongly typed GridView<RowType> :)