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>
<GridColumns>
<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>
GridColumns>
EjsGrid>
@code{
public List<string> status { set; get; }
protected override void OnInitialized()
{
status = new List<string>{"In Process","Completed"};
}
}
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: ' to resolve the ambiguity.
I have added the ModelType attribute to the EjsGrid tag as well but the error doesn't go away. Please help.
Thanks in advance.