We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Horizontal scroll for the popup containing items

Hi SF Team,


How can I have an horizontal scroll on the popup showing the items ? Futhermore will it works with virtualization ?

I tried with a custom ItemTemplate but I'm having a horizontal scroll by item which is not convenient.


Thanks.


Julien


1 Reply

VJ Vinitha Jeyakumar Syncfusion Team November 11, 2022 04:55 AM

Hi Julien,

Your requirement to add horizontal scrollbar to the popup list in the Combo Box can be achieved by customizing the below CSS styles,

Code snippet:
<SfComboBox CssClass="customCss" TValue="string" TItem="Record" Placeholder="e.g. Item 1" DataSource="@Records" Query="@LocalDataQuery" PopupHeight="130px" EnableVirtualization="true">
            <ComboBoxFieldSettings Text="Text" Value="ID" />
 </SfComboBox>

<style>
       .e-ddl.customCss .e-dropdownbase .e-list-item {
          overflow: visible;
          width: 500px; /* Need to provide width based on the provided text length */
        }
</style>


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Regards,
Vinitha

Loader.
Live Chat Icon For mobile
Up arrow icon