telerik Radlistbox displaying items horizontally rather vertically

1 Answer 43 Views
ListBox
Sandipan
Top achievements
Rank 1
Sandipan asked on 25 Jun 2021, 08:59 PM

I am displaying the items inside the RadListbox. Somehow the item are displaying horizontally rather than vertically. Below is my code:

<telerik:RadAjaxPanel runat="server" CssClass="demo-container demo-content"> <telerik:RadListBox RenderMode="Auto" ID="lstFolder" runat="server" Height="200px" Skin="Vista"> </telerik:RadListBox> </telerik:RadAjaxPanel>

code behind, .cs class, I am binding the RadListBox with data from the database:

private void bindFolder() { using (TrustedSystemContext dbContext = new TrustedSystemContext()) { lstBox.DataSource = dbContext.BoxInfo.ToList(); lstBox.DataTextField = "FolderName"; lstBox.DataValueField = "FolderId"; lstBox.DataBind(); } }

These are the items in the database:

the items are displaying like so:

I want Folder1, Folder 2 to display vertically rather than on one line.

anhy hel will be appreciated.

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 30 Jun 2021, 10:35 AM

Hi Sandipan,

The most probable cause for the issue is a custom CSS that is changing the display style for the <li> elements of the ListBox or there is a "float: left" style set. 

To investigate that, you can follow the links below and inspect the items as well as the styles applied to them. You can uncheck the checkboxes for the given styles and once the issue disappears you can see which stylesheet it came from and update it:

Regards,
Peter Milchev
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/.

Tags
ListBox
Asked by
Sandipan
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or