Hello, we are getting this error when trying to assign a datasource to a preinitialized Kanban board in JS:
Error: Query - where : Invalid arguments
at f (http://localhost/ScriptResource.axd?d=dEKVobek…hisJqPTPIx5hAKxFbJr797lSgHucfpIEYMze7LkpgJif41&t=ffffffff95a61f14:10:67571)
at Object.where (http://localhost/ScriptResource.axd?d=dEKVobek…hisJqPTPIx5hAKxFbJr797lSgHucfpIEYMze7LkpgJif41&t=ffffffff95a61f14:10:12758)
at i._ensureDataSource (http://localhost/ScriptResource.axd?d=1RdZeeYf…dWwz4LVm_5NEr3yRPs-4QP_7EEPB-Ig-vZoYiGRPbBCg1&t=ffffffff95a61f14:10:234565)
at n._processBindings (http://localhost/ScriptResource.axd?d=1RdZeeYf…dWwz4LVm_5NEr3yRPs-4QP_7EEPB-Ig-vZoYiGRPbBCg1&t=ffffffff95a61f14:10:142509)
at i.refresh (http://localhost/ScriptResource.axd?d=1RdZeeYf…dWwz4LVm_5NEr3yRPs-4QP_7EEPB-Ig-vZoYiGRPbBCg1&t=ffffffff95a61f14:10:235405)
at n._refreshDataSource (http://localhost/ScriptResource.axd?d=1RdZeeYf…dWwz4LVm_5NEr3yRPs-4QP_7EEPB-Ig-vZoYiGRPbBCg1&t=ffffffff95a61f14:10:174492)
at n._kanbanSetModel (http://localhost/ScriptResource.axd?d=1RdZeeYf…dWwz4LVm_5NEr3yRPs-4QP_7EEPB-Ig-vZoYiGRPbBCg1&t=ffffffff95a61f14:10:168980)
at i._setModel (http://localhost/ScriptResource.axd?d=1RdZeeYf…dWwz4LVm_5NEr3yRPs-4QP_7EEPB-Ig-vZoYiGRPbBCg1&t=ffffffff95a61f14:10:194091)
at i.setModel (http://localhost/ScriptResource.axd?d=T6pKVvIE…_Z2OWaMNQjtcGRv3e4yYJjRh0f8c2nEifUI3GVxgyGmKE1&t=ffffffff95a61f14:10:14488)
at jQuery.n.fn.(anonymous function) [as ejKanban] (http://localhost/ScriptResource.axd?d=T6pKVvIE…_Z2OWaMNQjtcGRv3e4yYJjRh0f8c2nEifUI3GVxgyGmKE1&t=ffffffff95a61f14:10:23532)
In our code we are just calling ejKanban assigning data source, which is a JS array retrieved from AJAX call
$("#<%= Kanban.ClientID %>").ejKanban(
{
dataSource: data,
keyField: "LeadStageUID"
}
);
What should we look for to find the cause of this error?
|
KanbanFeatures.aspx
$("#<%=Kanban.ClientID%>").ejKanban({
dataSource: KanbanData, // Loaded data using ajax post
columns: [
{ headerText: "Backlog", key: "Open" },
{ headerText: "In Progress", key: "InProgress" },
{ headerText: "Done", key: "Close" }
],
keyField: "Status"
}) |
|
KanbanFeatures.aspx
<ej:button ID="Start" runat="server" OnClick="Button_Click"></ej:button> // server side event
<ej:Kanban ID="Kanban" runat="server"> // Render Kanban
</ej:Kanban> |
|
KanbanFeatures.aspx.cs
protected void Button_Click(object sender, Syncfusion.JavaScript.Web.ButtonEventArgs e) // Triggered when button click
{
Task.Add(new Tasks(29, "Testing"));
this.Kanban.DataSource = Task;
Kanban.Columns.Add(new Syncfusion.JavaScript.Models.KanbanColumn
{
HeaderText = "Open",
Key = new List<String> { "Open" },
});
Kanban.Columns.Add(new Syncfusion.JavaScript.Models.KanbanColumn
{
HeaderText = "Close",
Key = new List<String> { "Close" },
});
Kanban.KeyField = "Status";
Kanban.Fields.PrimaryKey = "Id";
Kanban.Fields.Content = "Summary";
this.Kanban.DataBind();
}
|