Skip to content
Discussion options

You must be logged in to vote

Here is the example code:

@page "/"

<h3>OrderGrid</h3>

<DataGrid TItem="Van" Data="vans" Filterable=true Sortable=true>
    <DataGridColumns>
        <DataGridColumn Field="VanNr" Caption="Van" >
            <DisplayTemplate>
                @context.VanName
            </DisplayTemplate>
        </DataGridColumn>
        <DataGridColumn Field="VanName" Caption="Van" ></DataGridColumn>
    </DataGridColumns>
</DataGrid>


@code {
    List<Van> vans = new List<Van>()
    {
        new Van(){ VanNr=34, VanName="34 AL"},
        new Van(){ VanNr=102, VanName="102 VL"},
        new Van(){ VanNr=15, VanName="15"}
    };

    public class Van
    {
        public int VanNr { get; set; }  
   …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@tacoWanneeJama
Comment options

@stsrki
Comment options

@tacoWanneeJama
Comment options

Answer selected by tacoWanneeJama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants