Word wrapping checklist view data

My listview content is getting truncated when it is longer than a specific length. I haven't been able to figure out how to get the data in my list to word wrap.


There doesn't appear to be a setting on the listview to allow this, similar to the grid.


1 Reply 1 reply marked as answer

LD LeoLavanya Dhanaraj Syncfusion Team May 3, 2024 07:32 AM UTC

Hi Christopher,


Greetings from Syncfusion support.


From the shared details, we understand that you want to wrap the long text in the Blazor ListView component. With the help of CSS selectors, you can meet your requirement by applying the height and white-space CSS property to the ListView component.


Refer to the below code snippets and sample for further assistance.


Sample : https://blazorplayground.syncfusion.com/VtLTXeXUrHvbbcmk


<SfListView CssClass="list" DataSource="@FlatListData" TValue="DataModel">

    <ListViewFieldSettings TValue="DataModel" Id="ID" Text="Text"></ListViewFieldSettings>

</SfListView>

 

<style>

.list.e-listview .e-list-item {

    height: auto;

}

.list.e-listview .e-list-text {

    white-space: normal;

}

</style>


Output Screenshot :



Check out the shared sample at your end and get back to us if you need any further assistance.


Regards,

Leo Lavanya Dhanaraj


Marked as answer
Loader.
Up arrow icon