Split columns
Good morning
I am c-reating a list of data with SfDataGrid, and there will be 5 columns that will contain the information of the medical event, and 5 columns that will contain the information of the mission (ambulance), I would like to make it so that if you click on the row, but in the columns of the medical event, it opens a context menu and double-clicking opens a window, and if instead I press in the same row, but in the columns of the mission, it opens another context menu and double-clicking opens another different window
I'll give you a quick example of the datagrid using a table
| EVENT | MISSION |
| Date | Operator | Event | City | Address | Date | Mission | Operator | Ambulance | Status |
| 2024-09-07 15:30:00 | JONH.SMITH | Traumatic | Milan | Piazza del duomo, 1 |
2024-09-07 15:32:00
| 245123456 |
JONH.SMITH
| AMB_MI_178.A3 | Direct to target |
|
2024-09-07 15:35:00
| JOHN.SMITH | BLSD | Milan | Piazza del duomo, 20 |
2024-09-07 15:37:00
|
245123457 |
JONH.SMITH
| AMB_MI_287.A1 | Direct to target |
I forgot to say that all the code of the sfDatagrid is not on XAML but is added in the C# class code
Hi Daniele,
Based on the provided information, we are a little unclear about the requirement. However, we suspect that you intend to create and perform a specific action on a window when double-clicking on a cell. The issue arises when clicking on multiple cells, as multiple windows are created for each double-clicked cell, which seems improper. We have prepared a sample and attached a video reference for the issue you mentioned; please review this sample with your implementation.
If we have misunderstood the issue or if our implementation differs from yours, kindly share the relevant code snippets. If possible, try replicating the issue using our sample, or provide a sample where the issue is replicated. This will help us to provide a better solution.
Thank you for your understanding and cooperation.
Best Regards,
Gokul S
Attachment: WpfApp1_9931a759.zip
Hi,
I saw the video which is not entirely wrong, from the video you can see the datagrid, with two rows, and two parent columns "Events Details" and "Mission Datails", now what I want to do is the following, if I click any cell that is inside the parent column "Events Details" the program will do action A, if I click any cell inside the parent column "Mission Details" the program will do action B. example:
If I double click anywhere in the row (that is inside the parent column "Event Details") it will open the Event window, but if I do the same thing in the same row, but under the column "Mission Details" it will open the Mission window
Here is an example video (made with two separate datagrids!, I need a single datagrid, because in case there are more missions connected to the same event, the program must add the missions under the same event row without doubling the event data so the event row remains one, but with more mission rows (attacked)
Attachment: Registrazione_20240910_161038_40db21c3.zip
Hi Daniele,
Thanks for the update. Based
on the information provided, it seems you want to display the Mission and
Events in a single DataGrid, with Mission details as the Parent and Event
details as the Child. This can be achieved by using MasterDetailsView instead
of two separate SfDataGrids. We have provided online user guide documentation
for the Master Details View. Please refer to the UG link below:
UG Link: Master
Details View in WPF DataGrid control | Syncfusion
Additionally, we have prepared a sample with the DetailsViewDataGrid. Please
review the sample. However, we are currently working on displaying the cell
values in a new window when double-clicking on a cell, and we need more time to
complete this requirement. We will provide an update on or before September 13,
2024.
Regards,
Gokul S
Attachment: SimpleMasterDetailsView_1fe76f02.zip
Attachment: MasterDetailsView_7240fc2f.zip
Good morning
I apologize for the delay in responding, I saw the video,
it is partially incorrect, that is, the columns "MissionDate, MissionID, MissionOP, Mission Ambulance, Mission Status" must not be children of the Event columns, but rather placed side by side, let me explain better
112 sends an event card to the health emergency operations room, and the event card appears, subsequently the operator takes the information, and activates the necessary ambulances, and the connected mission (missions) will appear next to it
Exactly as in the example below, identical, now if I double-click anywhere on the event card it will do an action depending on the right or left button, and if I do the same thing on the mission card it will do something else, always taking into account that I have to insert buttons into the table that may or may not be present, depending on the situation
See images
Thank you for sharing the details regarding your requirements. We have reviewed the reported scenario and can confirm that displaying the columns side by side is not supported. However, we are currently exploring alternative controls to fulfill your requirement. We will need a bit more time to complete our analysis and will provide you with further updates by October 18, 2024.
Malini Selvarasu
Thank you for your patience.
Malini Selvarasu
Attachment: SfTreeGrid_Demo_5681789e.zip
- 8 Replies
- 4 Participants
-
DA Daniele
- Sep 7, 2024 10:05 AM UTC
- Oct 18, 2024 01:59 PM UTC