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

[object][Object] CustomEditor Scheduler !

3 Answers 10 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
K.Ramadan
Top achievements
Rank 2
Veteran
K.Ramadan asked on 30 Apr 2020, 12:57 PM

Hello EveryOne,

so I have two schedulers and I made for each Scheduler a CustomEditor.

Events Scheduler and Communication Scheduler...

In Both CustomEditor I have a Type DropDownList but each one is calling the items in the list from another table (another ActionMethod).

So one of the Type DropDownList works fine .. and by fine I mean if I edit an event and I change the value in the list .. it sends the new selected value to the actionMethod.

But the other one is working with one condition  !!

So I tested almost all options that I can do .. and one was WEIRD!

So that's what I did :

1- Create an Event

2- Give a Value for Type

3- Save the Event

4- Edit that Event

5- Change the value of Type

6- Save the Event

Now at step 6 .. it sends all new values to the ActionMethod...

but if I created an event and give it just a Title and Time without giving it a Type Value then try to do steps 4,5 and 6 .. it sends a value [object][Object] to the ActionMethod.

Now This is not a new problem .. I've seen others asking almost the same question .. but the answers there didn't help me much.

So Please .. any Solution will be great...

PS: This Worked Fine before two days .. now it doesn't 

3 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Tsvetanov
Telerik team
answered on 04 May 2020, 05:53 AM

Hi Karam,

It will be difficult to determine the exact cause of the problem without having the actual implementation of the custom editor locally. Having that said, I would like to ask you to prepare and send me a small isolated runnable sample project demonstrating the issue in question. Please, remove any external dependencies and database calls from that and use sample data created of the server to populate the Scheduler.

As per the weird behavior of the DropDownList on submit, have you set its ValuePrimitive(true) configuration method to "true"? 

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
K.Ramadan
Top achievements
Rank 2
Veteran
answered on 04 May 2020, 06:46 AM

Hello Veselin,

well that did the job done .. just setting every DropDownList in my custom Editor to ValuePrimitive( true ) ..

But can you or anyone please tell me what the difference between selected item value field and selected item value ..

They were mentioned here. I want to understand them so that i know how to work with this ValuePrimitive.

Thanks anyway .. that was the answer to my Problem ..

 

0
Accepted
Veselin Tsvetanov
Telerik team
answered on 05 May 2020, 11:03 AM

Hi Karam,

I am happy to hear that the suggested resolved the issue faced.

Here is the difference between the selected item value field (the dataValueField) and the selected item value (the value) of the widget. The dataValueField points to the name of the property (field) of the item object, which will be used to populate the value of the widget. Hence the dataValueField is a property name from the model, while the value is the actual value populated in the widget.

Regards,
Veselin Tsvetanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Scheduler
Asked by
K.Ramadan
Top achievements
Rank 2
Veteran
Answers by
Veselin Tsvetanov
Telerik team
K.Ramadan
Top achievements
Rank 2
Veteran
Share this question
or