.net - How to use Group by from a Dataview values in vb.net -


is there way use group on datatview values.i can sort values in dataview how group data in data view (in vb.net) want apply aggregate function on dataview how make possible?

you can group objects dataview or other data collection using groupby method extension.

for dataview you'd first have cast ienumerable(of datarowview). here's simplistic example:

dim groupedrows =     mydataview.cast(of datarowview).groupby(function(r) r("myfield")) 

if you're using typed dataset might find easier group on typed datarow instead you'll able use hard properties grouping rather object values obtained string references:

dim groupedrows =     mydatatable.groupby(function(r) r.myfield) 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -