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

Using DataSource property of Grid Column to show DropDown list in editing

Good day,

I have a GridColumn in which I want to show a simple drop-down list that contains two values i.e. "In progress" and "Completed". I have used the EditType.DropDown property and during editing a drop-down appears as well but it is empty with no text. I have used the DataSource property in GridColumn but the text is not being displayed. How can I display the text dropdown? 

It is to be noted here that I am using WebApiAdaptor with EjsDataManager to display and perform CRUD operations on data. 

<EjsGrid TValue="Projekte" AllowPaging="true" AllowFiltering="true" AllowSorting="true" Toolbar="@(new List() { "Add", "Edit", "Delete", "Cancel", "Update" })">
            <EjsDataManager Url="/Api/Default" Adaptor="Adaptors.WebApiAdaptor">EjsDataManager>
            <GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Normal">GridEditSettings>
                <GridColumn Field=@nameof(Projekte.Id) AllowEditing="false"HeaderText="ID" TextAlign="TextAlign.Right">GridColumn>
                <GridColumn Field=@nameof(Projekte.Status) HeaderText="Status" EditType="EditType.DropDownEdit" TextAlign="TextAlign.Right"
            DataSource="@status"> GridColumn>

    public List<string> status { setget}
    protected override void OnInitialized()
        status   = new List<string>{"In Process","Completed"};

P.S. I have tried using the Template inside the grid column (as shown here: https://www.syncfusion.com/forums/149233/syncfusion-blazor-binding-drop-down-list-in-grid-column) but it gives me an error. 

The child content element 'Template' of component 'GridColumn' uses the same parameter name ('context') as enclosing child content element 'Authorized' of component 'AuthorizeView'. Specify the parameter name like: '