Hi
I have data like below and i want Code,Name to be displayed only once
| CODE | NAME | DEBIT | CREDIT |
| C01 | ABC | 500 | |
| C01 | ABC | 200 | |
| C01 | ABC | 200 | |
| C01 | ABC | 200 |
Thanks
Hi
I have data like below and i want Code,Name to be displayed only once
| CODE | NAME | DEBIT | CREDIT |
| C01 | ABC | 500 | |
| C01 | ABC | 200 | |
| C01 | ABC | 200 | |
| C01 | ABC | 200 |
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.
Amit MohantyPosted Jan 6, 2025, 5:38 AM
If you want sql query, try this
Jignesh KumarPosted Jan 6, 2025, 4:05 AM
Hello Ramco,
Please use this once,
This will give you resulst as below,
Code Name Debit Credit
C01 ABC 500
200
200
200
Jaish MathewsPosted Jan 4, 2025, 3:26 AM
To display
CodeandNameonly once for each group of data (based onCodeandName), you can group the data byCodeandNameand suppress repeated values in their columns. This is commonly done in reporting or rendering grouped data in a grid-like format.Here’s how you can achieve this in C# using LINQ and Blazor:
Data Example
Data Preparation
Group and Suppress Repeats
Render in Blazor
Here’s an example of how to render the grouped data in a Blazor component:
Output Table
This approach groups the data and suppresses repeated values for
CodeandName, while preserving the full detail of the transactions. Let me know if you need additional clarifications!