Hi,
I need to use Kanban control with remote data for cards as well as for columns. However, I am not able to initiatize the data from the OnInitializedAsync method. Only way is as per the sample on your website ie: to populate the column data upon variable initiatlization. If I set the columndata in the OnInitializedAsync, I simply get nothing showing. Given this, I can't see how I could get the data (using a WASM).
Thanks for your help,
ma
<SfKanban KeyField="Phase" TValue="InitiativeCheckListTemplate" >
<SfDataManager Url="api/checklisttemplate" Adaptor="@Syncfusion.Blazor.Adaptors.WebApiAdaptor" CrossDomain="true"></SfDataManager>
<KanbanColumns>
@foreach (Syncfusion.Blazor.Kanban.ColumnModel item in columnData)
{
<KanbanColumn HeaderText="@item.HeaderText" KeyField="@item.KeyField"></KanbanColumn>
}
</KanbanColumns>
<KanbanCardSettings HeaderField="Id" ContentField="Name"></KanbanCardSettings>
</SfKanban>
// This one is working
@code {
private List<Syncfusion.Blazor.Kanban.ColumnModel> columnData = new List<Syncfusion.Blazor.Kanban.ColumnModel>() {
new Syncfusion.Blazor.Kanban.ColumnModel(){ HeaderText= "To Do", KeyField= new List<string>() { "0" } },
new Syncfusion.Blazor.Kanban.ColumnModel() { HeaderText = "In Progress", KeyField = new List<string>() { "1" } },
new Syncfusion.Blazor.Kanban.ColumnModel() { HeaderText = "Testing", KeyField = new List<string>() { "2" } },
new Syncfusion.Blazor.Kanban.ColumnModel() { HeaderText = "Done", KeyField = new List<string>() { "3" } }};
}
//Not working
@code {
private List<Syncfusion.Blazor.Kanban.ColumnModel> columnData = new List<Syncfusion.Blazor.Kanban.ColumnModel>();
protected override async Task OnInitializedAsync()
{
columnData = new List<Syncfusion.Blazor.Kanban.ColumnModel>() {
new Syncfusion.Blazor.Kanban.ColumnModel(){ HeaderText= "To Do", KeyField= new List<string>() { "0" } },
new Syncfusion.Blazor.Kanban.ColumnModel() { HeaderText = "In Progress", KeyField = new List<string>() { "1" } },
new Syncfusion.Blazor.Kanban.ColumnModel() { HeaderText = "Testing", KeyField = new List<string>() { "2" } },
new Syncfusion.Blazor.Kanban.ColumnModel() { HeaderText = "Done", KeyField = new List<string>() { "3" } } };
}
}