Hi,
I have a list with users and orders in one list like below
| user 1 | order1 |
| user 1 | order2 |
| user 1 | order3 |
| user2 | order2 |
| user2 | order3 |
From here I have form as user1 with his orders list (1,2,3) as one group and user2 as (2,3) with another in C#
Thanks
Hi,
I have a list with users and orders in one list like below
| user 1 | order1 |
| user 1 | order2 |
| user 1 | order3 |
| user2 | order2 |
| user2 | order3 |
From here I have form as user1 with his orders list (1,2,3) as one group and user2 as (2,3) with another in C#
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Nov 24, 2022, 12:19 PM
you can iterate using above code
sathishPosted Nov 24, 2022, 1:03 PM
Thanks Jignesh.
How this iterated values to be loaded to the existing HTML table
Thanks
sathishPosted Nov 24, 2022, 10:30 AM
Hi,
How to iterate this one and as per user and respective orders
Thanks
sathishPosted Nov 23, 2022, 12:50 PM
Thanks Jignesh.
And any possibility to pass 'groupByUser' to the list
Aravind GovindarajPosted Nov 23, 2022, 11:40 AM
var ordersByUser = ordercollection.groupby(order=>order.userId);
In orderByUser result, you will get the result as
Item 1 => User 1 => Order1, Order 2, Order 3
Item 2 => User 2 => Order 2 and Order 3
Jignesh KumarPosted Nov 23, 2022, 10:42 AM
Hi Satish,
Please check below code and try ,