How to size row height for multiline data in datagrid

1 Answer 189 Views
DataGrid
Casey
Top achievements
Rank 1
Casey asked on 04 Dec 2021, 02:01 AM
Is there a way to change the row height when the data for a column is multiline?  Not every row has multiline so I don't want to use the RowHeight property.  I can use a flyout to display the data, as in the attached screenshot,  but I'd really rather have it directly in the grid.  I'm using a textblock control inside a template column.  I had it working in using the Community Toolkit datagrid but when I switched to the Telerik version, I haven't been able to figure it out. 

1 Answer, 1 is accepted

Sort by
1
Accepted
Dilyan Traykov
Telerik team
answered on 08 Dec 2021, 01:14 PM

Hello Casey,

Thank you for the provided image.

Based on your description, I believe you can set the RowHeight property to double.NaN to achieve the desired result:

this.dataGrid.RowHeight = double.NaN;

Can you please give this a try and let me know whether doing so works for you?

Regards,
Dilyan Traykov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Casey
Top achievements
Rank 1
commented on 08 Dec 2021, 02:35 PM

Thanks Dilyan!  That worked perfectly.  
Tags
DataGrid
Asked by
Casey
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Share this question
or