Telerik Forums
Kendo UI for jQuery Forum
1 answer
73 views

Hi,

There are question as below, I could not provide a code snippet because for editing require an API which are not available as development is in progress

  • can I know is there a way to get the response code / response message after the API is call. For example code below, after the create API call I would like to get the response code example 200 or 500 so that we can manipulate error message that require to show for user. Example if kendo taskboard it have "requestEnd" event
transport: {
	read: {
		url: crudServiceBaseUrl ,
		dataType: "json"
	},
	create: {
		url: crudServiceBaseUrl + "/add",
		dataType: "json"
	},
	update: {
		url: crudServiceBaseUrl + "/update",
		dataType: "json"
	},
	destroy: {
		url: crudServiceBaseUrl + "/delete",
		dataType: "json"
	},
	parameterMap: function (options, operation) {
		if (operation !== "read" && options.models) {
			return { models: kendo.stringify(options.models) };
		}
	}
},
  • when I perform  transport "destroy", I realize that it will first remove the node before calling API. I wonder what happen if I fail to remove from our own logic (hit issues when remove from database) then how can we revert the node? 
  • Is it in treelist we can get parent value and assign to a hidden field? Treelist only support number for id and parentid (hierarchy), howeer in our case we use GUID. Therefore, I generate number just for hierarchy display (and drag and drop) purpose. However the models only recognize the parentid but not guid that is from other field.
  • on my page I reliaze that sometimes the jquery are calling the API and sometimes not? Is it related to the placement file of my kendo script versus jquery file?
  • When I add new item, from backend we success to trigger and I return response 200 and model data as per below
{"Project":"e81af126-13cd-40c4-951b-9611fa85f39c","ID":"fc980fda-40c5-4fda-b97d-dfc0aced6a10","Description":"123123","WBSType":1,"SequenceNumber":0,"Parent":null,"BudgetSalesAmountDC":0.0,"BudgetCostsAmountDC":0.0,"Quantity":10.0,"WBSIcon":"","ReportsTo":null,"WBSRunningNumber":0,"hasChildren":false}

however from front-end it will never append. I follow exact implementation from the snippet / tutorial, accept the response type 
Neli
Telerik team
 answered on 23 Feb 2023
0 answers
111 views

Hi, 

I was developing using kendo UI TreeList, however I found an issue when I drop a row from 1 parent to another, the source was not reparenting to the correct parent. Instead if was set to wrong position (as for my case it become a parent itself).

Step to reproduce:
Open this url https://dojo.telerik.com/UCUXaloN

Drag "Sprint planning (2012-2728)" and drop it to "Kick off" as per image below
After the drop the e.position should be "over" and I expect the row will appear inside "Kick Off" node and not as a parent itself. In the drop event after the "over" I will have my own logic to perform certain task.

Help is needed as I try with different and still not able to position it correctly. 

Kok Ho
Top achievements
Rank 1
 asked on 27 Jan 2023
0 answers
60 views
Hello , I am getting issue in tree menu drag and drop. how to stop it. it's coming is randomly kindly help.
Sanjay
Top achievements
Rank 1
Iron
 updated question on 14 Feb 2022
1 answer
76 views

Hello,

I have treelists with two levels of items (titles and positions). The titles can be rearranged via drag&drop. Dragging a title onto another title changes the order of titles. Positions can both be dragged under the same title but also to an other title.

Examples:

  • Dragging title 4 onto title 2 makes title 4 the new title 2, title 2 becomes title 3 and title 3 becomes title 4. All subitems (positions) stay with their titles.
  • Dragging position 4 in title 3 (3.4) onto position 2 in title 3 (3.2) makes 4 the new 2 (3.2), 2 the new 3 (3.3) and 3 the new 4 (3.4).
  • Dragging position 4 in title 3 (3.4) onto position 2 in title 2 (2.2) makes 4 the new 2 in title 2 (2.2), 2 in title 2 the new 3 in title 2 (2.3) and position 5 in title 3 (3.5) the new position 4 in title 3 (3.4).

To do this (see code in attachment) I manipulate the title field and the parentId of the datasource. This worked fine as long as I dirctly saved items that were added to the list. But now I have to use batch save.

Now when I add a new title to the list and add or rearrange positions to that title or rearrange titles via drag&drop before saving the affectet titles and positions are attached to wrong parent items, sometimes items get duplicated. Doing the same thing after saving works as intended.

I assume the reason for this is that new items have an Id of 0 before saving.

I see that it is possible to rearrange items in treelists via drag & drop in your demos without manipulating these fields manually. But I don't see how can do this and get the same results as in the examples above. Could you please help me figure this out?

Note: in the attached files I have included sampledata as local data. In the project we bind to remote data. Not sure if this affects the beavior

Georgi Denchev
Telerik team
 answered on 18 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?