|
<EjsListView DataSource="@Data">
<ListViewFieldSettings Id="Id" Text="Name"></ListViewFieldSettings>
</EjsListView>
@code {
private SomeModel[] Data =
{
new SomeModel { Name = "ArtWork", Id = "list-01" },
new SomeModel { Name = "Abstract", Id = "list-02" },
new SomeModel { Name = "Modern Painting", Id = "list-03" },
new SomeModel { Name = "Ceramics", Id = "list-04" },
new SomeModel { Name = "Animation Art", Id = "list-05" },
new SomeModel { Name = "Oil Painting", Id = "list-06" }
};
}
Class.cs file
public class SomeModel
{
public string Name { get; set; }
public string Id { get; set; }
} |
|
@using Syncfusion.EJ2.Blazor.Lists
<EjsListView DataSource="@Data">
<ListViewFieldSettings Id="@id" Text="@text"></ListViewFieldSettings>
</EjsListView>
@code {
private SomeModel[] Data =
{
new SomeModel { Name = "ArtWork", Id = "list-01" },
new SomeModel { Name = "Abstract", Id = "list-02" },
new SomeModel { Name = "Modern Painting", Id = "list-03" },
new SomeModel { Name = "Ceramics", Id = "list-04" },
new SomeModel { Name = "Animation Art", Id = "list-05" },
new SomeModel { Name = "Oil Painting", Id = "list-06" }
};
public string text = nameof(SomeModel.Name);
public string id = nameof(SomeModel.Id);
}
public class SomeModel
{
public string Name { get; set; }
public string Id { get; set; }
} |