score:2
Accepted answer
var columns = dt.columns.cast<datacolumn>()
.where(c => c.datatype == typeof(int) && c.columnname.endswith("_"))
.tolist();
var query = dt.asenumerable().where(row => columns.all(c => row.field<int>(c) == 1));
Source: stackoverflow.com
Related Query
- How to filter data from datatable according to columns suffix
- How to group by on multiple columns from datatable with linq?
- Filter data from DataTable
- How to get 2 columns from datatable in linq
- How to convert hierarchical data from a DataTable to JSON
- How to select multiple columns from datatable in linq group by?
- Filter data from Xml according to date in C#
- How to Filter out null rows from DataTable with linq?
- How to select Columns using where condition from one DataTable to another in C#
- How do you filter out data that exists in a list from a Query?
- How to use LINQ to get unique columns from a DataTable
- How to select the data from datatable which not in an IEnumerable
- How do I group items from a collection using LINQ and return the shaped data according the collection type
- How to pull filtered Data from a Datatable and create a string
- How to apply between clause on two columns in Linq query while searching from datatable C#?
- how to filter data from from a dictionary to list
- How to create (predicate) for fetching data from DataTable using Express.call method
- How to select columns and sum of columns using group by keyword from data table in c#
- LINQ: How to exclude data columns from DataTable.ItemArray query?
- How to group data from table with multiple columns
- How to select first n number of columns from a DataTable
- how to get data from datatable by ( select and Group By)
- Filter Data in observable collection based on the columns in datatable
- How to filter specific columns from a child table Entity Framework
- How do I get a distinct, ordered list of names from a DataTable using LINQ?
- How can I filter a dictionary using LINQ and return it to a dictionary from the same type
- How I can filter a dataTable with Linq to datatable?
- How to delete rows from DataTable with LINQ?
- How to inner join tables from different Data Context?
- Use LINQ to group data from DataTable
More Query from same tag
- Linq Group By Object Then Select
- How to get the union of two sets of objects that inherit from a common class
- Suggestions on why this linq ef core query wont execute
- Searching a List to check if a child Object exists already
- What is the purpose of AsQueryable()?
- How to populate an array from a DataSet in VB.NET
- Using split with \r\n\r\n
- How can I split a list vertically in n parts with LINQ
- Alternate of if and foreach for Linq
- Unable to create non-generic LINQ function within Repository class
- The filters navigation Only one unique filter per navigation is allowed
- ASP.net 4.0 Entity Data Model Mysql Not Treating Mysql Enums Right
- Finding Consecutive Items in List using Linq
- LINQ - Complex Sorting
- linq as dataset issue with column names
- IEnumerable<dynamic> with linq
- DataTable linq query to group by a column
- Exclude items from a model - MVC/ASP.Net
- How to obtain the maximum datetime of each item2 & item3 combination?
- Join and subtract values from 2 lists using linq
- Entity Framework: Can't use "Contains" with property on another object
- Retrieve bool result by using LinQ code
- Lambda between two dates explicit
- Why can't I use LINQ in ASP.NET?
- side-operations and aggregations inside LINQ, before select
- Search for a object list for a object with a minimum value and add that object with new value to a list
- OrderBy a List<Tuple<int, int>> by Item2 only
- Fill a List<string> inside a known object with LINQ?
- Filter Both Parent And Child Collection
- Filter all the record having navigation property in Linq .Net MVC