Multi-row in a single row

Good morning,

I'm using "SfDataGrid", I would like to know if it was possible to use two rows within a row, as you can see in the photo, without wrapping (I made the example using Excel, to make you understand what I wanted to achieve)

Image_8762_1705175605807


9 Replies 1 reply marked as answer

GS Gokul S Subramani Syncfusion Team January 15, 2024 02:17 PM UTC

Hi Daniele,

Your requirement for 'Merging Cells' can be achieved based on index, content, and range. You can refer to our online user guide documentation below.


UG link: Merge Cells in WPF DataGrid control | Syncfusion

We hope this helps. Please let us know if you need any further assistance.

Regards,
Gokul S



DA Daniele replied to Gokul S Subramani January 18, 2024 12:16 PM UTC

HI,

Thanks for your answer, I checked, but the solution you provided is not good for me, I'll explain, the program starts, and then receives data from the mysql database via a "WEB API ASP.NET Core" server, you have to put the data just received in place of the examples, in a specific column and row, so I would need a row that contains two rows, and have the possibility of inserting a certain piece of data into a certain cell, I don't know if I have Well explained, I'll give you another example



Image_6605_1705579965385

I apologize if I wrote in the cells in Italian, but it was more convenient for me.


Translation:

ORA -> Time

CODICE MEZZO -> Vehicle Code

TIPO MEZZO -> Medium type

DISTANZA  ->  Distance

STAZIONAMENTO DESTINAZIONE  ->  Destination parking

CONVENZIONE  ->  Convention

PARTENZA DA (LOCALITA' - VIA)  ->  Departure from (Location - Street)

DESTINAZIONE (LOCALITA' - VIA)  ->  Destination (Location - Street)

Serv (idk)

FREQUENZA  ->  Frequency

TELEFONO -> Telephone



SB Sweatha Bharathi Syncfusion Team January 19, 2024 01:36 PM UTC

Hi Daniele,


We have analyzed your query and understood your requirement. You need to merge two rows for a specific cell. We have prepared a sample for merging in cases where there are empty cells in the row. We have merged the rows below with the empty cell.


We have provided a sample for your reference. Please review the sample and let us know if we have misunderstood your requirement. If so, please provide details about your requirement. This will be helpful in proceeding further.


UG Link : https://help.syncfusion.com/wpf/datagrid/merge-cells#merging-cells-based-on-the-content


Image Reference:




Attachment: SfDataGrid_Demo_b2a83b0f.zip

Marked as answer

DA Daniele replied to Sweatha Bharathi January 19, 2024 06:53 PM UTC

It's perfect!

Thank you so much!



SB Sweatha Bharathi Syncfusion Team January 22, 2024 12:39 PM UTC

Hi Daniele,


Glad that your issue is resolved!! We are closing this ticket now. Please reopen this ticket or open a new ticket if you need any assistance.




DA Daniele replied to Sweatha Bharathi August 31, 2024 02:53 PM UTC

Hi,

I just resumed the project, which was assigned this question, but I noticed that the solution is only half right, after the two rows are joined I need them to behave like a single row, so if I use 

SelectionUnit="Row"

I need it to select the new row, and not count them as two separate rows

See current

Image_3434_1725115768389

It must be like this

Image_1094_1725115991133



GS Gokul S Subramani Syncfusion Team September 3, 2024 09:57 AM UTC

Hi Daniele,


Thank you for reaching out to us. We understand your requirement. However, the Syncfusion WPF SfDataGrid does not currently support considering merged rows as a single row when the SelectionUnit is set to Row or Any. Therefore, it is not possible to select merged rows as a single row or count them as one.


Thank you for your understanding and cooperation.


Best Regards,

Gokul S



DA Daniele replied to Gokul S Subramani September 5, 2024 07:42 PM UTC

I see, in this case I can send the text to a second line in the cell, and split the cell into two by one line? Example below

Image_5682_1725565348926

Image_8352_1725565204112



GS Gokul S Subramani Syncfusion Team September 6, 2024 12:58 PM UTC

Hi Dainele,


Based on the information you provided, we are a bit unclear about your requirement. However, we suspect that you intend to merge the cells when entering the same text for adjacent cells, but the cells were not merged and were treated as having different text. For your information, cell merging can be achieved based on index, content, and range. You can refer to our online user guide documentation for more details.


UG link: Merge Cells in WPF DataGrid control | Syncfusion


Additionally, we have implemented the behavior you expected and attached a sample and an output video for your reference. Please review the sample, and if we have misunderstood the issue or if our implementation differs from yours, kindly share the relevant video and code snippets. If possible, try replicating the issue using our sample, or share a sample where the issue has been reproduced.


If you are experiencing a new issue, please provide video references showing the issue. This will help us offer a more accurate solution.


We have provided the online user guide documentation for merge cell limitations. Please refer to the link below.


UG Link: Merge Cells in WPF DataGrid control | Syncfusion


Thank you for your understanding and cooperation. Please revert us back if you need any further assistance. We are always happy to assist you.


Best Regards,

Gokul S


Attachment: Ticket186255_e8f3ed4.zip

Loader.
Up arrow icon