Hi
I have below data
| Group 2C |
| Group 2C(i) |
| Group 3C |
| Group 3D |
| Group 3D(i) |
| Group 3E |
| Group 3G |
I want to display like below
Group 2C , Group 2C(i)
Group 3C
Group 3D , Group 3D(i)
Group 3E
Group 3G
Thanks
Hi
I have below data
| Group 2C |
| Group 2C(i) |
| Group 3C |
| Group 3D |
| Group 3D(i) |
| Group 3E |
| Group 3G |
I want to display like below
Group 2C , Group 2C(i)
Group 3C
Group 3D , Group 3D(i)
Group 3E
Group 3G
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.
Vishal JoshiPosted Jun 13, 2023, 11:10 AM
Hello
Try the below query. Instead of AsEnumerable try IQueryable.
Thanks
Amit MohantyPosted Jun 13, 2023, 10:11 AM
try this, updated
Ramco RamcoPosted Jun 13, 2023, 9:51 AM
Hi AMit
It is giving same result
Thanks
Amit MohantyPosted Jun 13, 2023, 9:39 AM
Updated code
Ramco RamcoPosted Jun 13, 2023, 9:30 AM
Hi Amit
I have attached again
Ramco RamcoPosted Jun 13, 2023, 9:25 AM
Hi AMit
I have attached image
Amit MohantyPosted Jun 13, 2023, 9:18 AM
Could you please list the properties that are contained within the group class? Additionally, which specific property is used to store the group name?
Ramco RamcoPosted Jun 13, 2023, 9:12 AM
Hi Amit
It should show the Groupname but it is displaying like image attached
Thanks
Amit MohantyPosted Jun 13, 2023, 8:52 AM
Assuming that the Group class has a property called "Name" that contains the group name
Ramco RamcoPosted Jun 13, 2023, 8:42 AM
Hi Vishal
I am getting same error
Thanks
Vishal JoshiPosted Jun 13, 2023, 8:32 AM
Hello Ramco,
Please try the below query with AsEnumrable to get the split function working.
Thanks
Ramco RamcoPosted Jun 13, 2023, 8:08 AM
Hi Amit
I am getting error - Group does not contin a definition for split
Thanks
Amit MohantyPosted Jun 13, 2023, 7:11 AM
try this:
Mohamed Azarudeen ZPosted Jun 13, 2023, 6:45 AM
To display the data as you described, you can use a loop to iterate over the groups and check if the group name ends with "(i)". If it does, you can display it on the same line as the previous group. Otherwise, you can display it on a new line. Here's an example implementation in Python:
see the output below