D
dclist
I can't seem to get the syntax right for invoking a Linq select
statement on a dataview object (datatable would not be ideal but
acceptable). I want to do something like the following:
var foo = from DataRow row in mydataview group row by
row['groupfield'] into x select new {field1=x['field1'],
field2=x['field2']}
foreach(var r in foo){
var myfield = r["myfield"] // use column in some way
}
I've tried different combinations of AsEnumerator, Field<string> and
using accessors instead of indexers but can't get anything to work.
Any help would be appreciated.
statement on a dataview object (datatable would not be ideal but
acceptable). I want to do something like the following:
var foo = from DataRow row in mydataview group row by
row['groupfield'] into x select new {field1=x['field1'],
field2=x['field2']}
foreach(var r in foo){
var myfield = r["myfield"] // use column in some way
}
I've tried different combinations of AsEnumerator, Field<string> and
using accessors instead of indexers but can't get anything to work.
Any help would be appreciated.