This is a migrated thread and some comments may be shown as answers.

Use multiselect as custom editor in treelist

3 Answers 148 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Fabio Masini
Top achievements
Rank 1
Fabio Masini asked on 16 Jul 2020, 12:53 PM

Hi I need to use a multiselect control in inline edit of a treelist object.

I've not found anythings usefull in forum about that, but there is somethings about the same request in grid control.

 

At this link there is a usefull documentation but when I use it in my treelist control, it doesn't works.

 

Cannot read property 'toLowerCase' of undefined
If edit in dojo the example linked above, and changing the definition of grid in kendoTreeList, appear this error.
Is the same I get in my project.

 

e.slice is not a function
Removing the definition as kendo.data.DataSource to the dataSource object, it "resolve" the first problem, and TreeList data are rendered correctly, but there are no items in multiselect column selector, cause this new error.

Thanks

3 Answers, 1 is accepted

Sort by
0
Silviya Stoyanova
Telerik team
answered on 20 Jul 2020, 01:50 PM

Hello Fabio,

I would suggest following the approach presented in the Dojo example below. It does not use custom binding and it is easier to follow: 

Let me know if you need further assistance on that matter.

Kind Regards,
Silviya Stoyanova
Progress Telerik

0
Fabio Masini
Top achievements
Rank 1
answered on 22 Jul 2020, 07:30 AM

Hi Silviya, I've followed the dojo sample and it did the trick, but I have some problem saving items.

First problem: the row don't become automatically dirty, changing selected values in the multiselect column. I have managed the dirty status in change event, but to get the current row, I've set an external variable and set it in treelist edit event to point to the currentRow and reset it in cancel and save event. Let me know if there is a better way to do it.

Second Problem: saving the row I receive null value for multiselect column property. I've debugged the parameterMap function and the problem is client side, cause here my countries property is already an empty array. Checking in the model, when I set dirty property to true, in the model the countries property is empty even if I've just select more than one value.

Thank you

0
Silviya Stoyanova
Telerik team
answered on 23 Jul 2020, 02:56 PM

Hello Fabio,

We have examined the Dojo that we previously sent, but it looks that the countries' field is getting marked as dirty. You could also test it here: https://dojo.telerik.com/@Silvia/OjaNoweY  or by setting the edit mode to "incell".

Could it be possible for you to modify the sample with your model configuration in order to examine it?

Kind Regards,
Silviya Stoyanova
Progress Telerik

Tags
TreeList
Asked by
Fabio Masini
Top achievements
Rank 1
Answers by
Silviya Stoyanova
Telerik team
Fabio Masini
Top achievements
Rank 1
Share this question
or