Hi Support Team,
I have a question related to the Kanban and kindly need your advice related to it:
|
<ejs-button id="normalbtn" content="Open"></ejs-button>
<ejs-kanban id="Kanban" keyField="Status" dataSource="@ViewBag.data" created="onCreate">
<e-kanban-columns>
. . .
. . .
</e-kanban-columns>
<e-kanban-cardsettings headerField="Id" contentField="Summary"></e-kanban-cardsettings>
</ejs-kanban>
<script>
var kanbanObj;
function onCreate() {
kanbanObj = this;
}
var btnElement = document.getElementById("normalbtn");
btnElement.addEventListener('click', function () {
let column = { headerText: "Pre Check-List", keyField: "CheckList" };
kanbanObj.addColumn(column, 0);
btnElement.style.display = "none";
});
</script> |
Hi Support Team,
Thank you for the solution that had been provided. The first query satisfies my requirement but for the second query, I think I should be giving you more details what I’m required and there are also several issues that I need to ask.
|
btnElement.addEventListener('click', function () {
var columnKeyField = "Testing";
for (var i = 0; i < kanbanObj.columns.length; i++) {
if (columnKeyField === kanbanObj.columns[i].keyField) {
alert(i);
}
}
}); |
|
kanbanObj.addColumn({ keyField: key, headerText: text, showItemCount: true, template:"#headerTemplate" }, index); |
|
kanbanObj.deleteColumn(index); |
Hi Support Team,
Thank you for the solution that have been provided. I'm able to solve my issues based on the solution given.
Nevertheless, there are some more issues that need to be ask.
1. How to make kanban content to have same value as the first column. For example, the first column is "Testing" with card "{task 1, task 2, task 3 }" so,
when adding new column using the "Testing" keyfield, the card should be able to show the same value = "{task 1, task 2, task 3 }".
2. As following the solution of the given before, I'm able to add the new column and deleting the column based on the column index, but I'm facing some problem when I deleting
all the column and then I try to add the new column it will show an error like this:
it's refer to this line of code: