Adjust the threshold for ellipsis truncation of DataGrid HeaderText

Hello,

I have a stylistic issue where I feel that there is still enough space to fit more of the HeaderText before the ellipsis triggers to truncate the text. What would be the best approach to adjusting this while being mindful of the sort ASC or DSC icon to show?


Screenshot 2024-10-21 100943.png



1 Reply

PS Prathap Senthil Syncfusion Team October 22, 2024 03:28 PM UTC

Hi Nick Lau,

Based on the reported query, we would like to clarify that there is some default spacing when using the sort and filter icons in the grid column header text. This is the default behavior, allowing you to use the ClipMode.EllipsisWithTooltip feature. This setting will truncate the header text with an ellipsis and display the full content in a tooltip when you hover over it. This approach helps you view the entire header text. For more details, you can refer to the following documentation.

https://blazor.syncfusion.com/documentation/datagrid/cell#clip-mode

<SfGrid @ref="Grid" DataSource="@Orders" AllowPaging="true" Height="315">

    <GridColumns>

                <GridColumn Field=@nameof(OrderData.NumberofINPADOCpatents) HeaderText="Number of INPADOC patents" Width="100"></GridColumn>

        <GridColumn Field=@nameof(OrderData.MainFields) HeaderText="Main fields of Invention" ClipMode="@ClipMode.EllipsisWithTooltip" Width="120"></GridColumn>

    </GridColumns>

</SfGrid>

 


Regards,
Prathap Senthil


Loader.
Up arrow icon