This topic contains 1 reply, has 2 voices, and was last updated by Christopher 9 years ago.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
jQuery UI Widgets › Forums › Layouts › Kanban › Kanban addItem
Tagged: angular kanban, bootstrap kanban, javascript kanban, jquery kanban, jqwidgets kanban, jqxkanban add a row
This topic contains 1 reply, has 2 voices, and was last updated by Christopher 9 years ago.
Hi !
I try to refresh a kanban with the result of an ajax query.
My kanban is composed of 2 columns, and each column has several items (representing persons) :
Name on the top, and role on the bottom part of the item.
I have a form to add a new person (Name and role).
An ajax query save the new person in the database and the response is the new list of persons (including the new one).
This list is a json.
I set this json to the localData of my kanban source.
As there is no refresh function, I remove all kanban’s items and then add the new items list one by one with the addItem function :
localdata.forEach(updateKanbanItems);
It works fine except for the new person I added. The role is displayed in the item, but instead of having is name, “no name” is displayed.
I think it’s a mapping problem because when I refresh my page, the kanban is well displayed.
In my new json list, i have these properties :
classname, color, content, id, identity, libelle, name, resourceId, status, tags and text
When i refresh my page :
color, id, identity, libelle and status
Do you have any idea? when we change the kanban localdata, do we have to set again a mapping ? how ?
Thx a lot for your help. It’s the last bug of my application !!!!!
Hi ksaidi,
please look at this example: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxkanban/kanban-settings.htm?light
When you are adding a new row you need to include the field that points to the corresponding resourceSource localdata row ( in the above example, “resourceId” property in Source.localData contains the id of the corresponding resourceSource.localData row). If you want the newly added row to contain new data you also need to add a new line to the resourceSource.localdata with the new info about the new record. Also the Json that you are passing to the sources.localdata must contain valid fields, that are defined in the “fields” array.
Best Regards,
Christopher
jQWidgets Team
http://www.jqwidgets.com
You must be logged in to reply to this topic.