Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146624 | Aug 11,2019 01:55 PM UTC | Aug 17,2019 01:40 AM UTC | Blazor | 7 |
![]() |
Tags: ListBox |
<EjsListBox Value=@Value DataSource="@Data" TValue="string[]"></EjsListBox>
<style>
.e-listbox-wrapper .e-list-parent {
display: flex;
flex-wrap: wrap;
}
.e-listbox-wrapper .e-list-item {
width: 25%; // adjust the width of the list item based on your need.
}
</style>
@code{
public string[] Value = new string[] { "Hennessey Venom" };
public List<object> Data = new List<object>
{
new { text = "Hennessey Venom", id = "list-01" },
new { text = "Bugatti Chiron", id = "list-02" },
..//
};
} |
<EjsListBox Value=@Value DataSource="@Data" TValue="string[]" CssClass="e-custom"></EjsListBox>
<style>
.e-custom .e-list-parent {
display: flex;
flex-wrap: wrap;
}
.e-custom .e-list-item {
width: 25%;
}
</style> |
<EjsListBox Value=@Value DataSource="@Data" TValue="string[]" CssClass="e-custom">
<ListBoxSelectionSettings ShowCheckbox="true"></ListBoxSelectionSettings>
</EjsListBox>
<style>
.e-listbox-wrapper .e-list-parent {
display: flex;
flex-wrap: wrap;
}
@@media (min-width: 320px) and (max-width:480px) {
.e-custom .e-list-item {
width: 100%;
}
}
@@media (min-width: 480px) and (max-width:780px) {
.e-custom .e-list-item {
width: 50%;
}
}
@@media (min-width: 780px) and (max-width:1920px) {
.e-custom .e-list-item {
width: 25%;
}
}
</style>
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.