I have a gridview associated with a table in a database using EntityDataSource . I fill the gridview with only elements in db that match the where clause.
FRUIT COLOR NUMB.SEEDS ORANGE ORANGE 3 APPLE RED 4 ORANGE ORANGE 2 STRAWBERRY RED 0
I want to summarize similar lines with respect to NUMB.SEEDS, for example:
FRUIT COLOR NUMB.SEEDS ORANGE ORANGE 5 APPLE RED 4 STRAWBERRY RED 0
Any hint please? I donβt know where to start.
Here I put the where clause:
<asp:EntityDataSource ID="MyEfDataSource" runat="server" ContextTypeName="MyContext" EntitySetName="Fruits" EntityTypeFilter="Fruit" AutoPage="true" AutoSort="true" Where="it.idName = @idName"> <WhereParameters> <asp:ControlParameter ControlID="ddlFruit" PropertyName="SelectedValue" Type="Int32" DefaultValue="0" Name="idName" /> </WhereParameters> </asp:EntityDataSource>
source share