Our flexible Kanban board for managing tasks with drag drop


Post by daniel lucena »

Hi, I'm writing code that integrates the gantt and the taskboard and I'm using the Project instance of the gantt. The crudStore does not have a column store, I would like to know if there is a way to add this store inside the project's crudStore, I saw that there is an addCrudStore method, but I don't know how to access the crudStore from the taskboard.

And i another other question, what is the method to add a new column to the taskboard ? I see some examples using add method to columns, but when i try to access it i get undefined.


Post by marcio »

Hey daniel,

To access the crudStore, you need to access taskboard.project.addCrudStore, as you can see here https://bryntum.com/products/taskboard/docs/guide/TaskBoard/data/crud_manager

To add a column, you need to use the following snippet

taskBoard.columns.add({ id, text : `Column #${id}` });

As you can see here https://bryntum.com/products/taskboard/docs/api/TaskBoard/view/mixin/TaskBoardColumns#property-columns, it's a store, which means that you can use the add function.

Check our demo with that here https://bryntum.com/products/taskboard/examples/columns/

Best regards,
Márcio


Post by daniel lucena »

But is there any way for me to get the columns store from the taskboard to add it to the project's crudStore? For example this code:

function addNewStore() {
  project.addCrudStore(#how i get the column store to pass here);
  console.log(project.crudStores);
}

Cause i want to make the columns data persistent into the database and be able to edit like we already have with tasks data. Do i have to create a rest route only to retrieve the column data or can i pass the column store to the crud manager ?


Post by marcio »

I believe taskboard.columns.data is what you're looking for. https://bryntum.com/products/taskboard/docs/api/Core/data/Store#property-data

That's the data related to the columns in the Taskboard.

Best regards,
Márcio


Post Reply