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

[Solved] Popup : preselect item in (resource) dropdown

3 Answers 181 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gert
Top achievements
Rank 1
Gert asked on 09 Feb 2015, 01:25 PM
I have 2 questions regarding the scheduler's popup
1) how to preselect a value in the combobox ?
2) how to remove the 'none'-item in the combobox ?

3 Answers, 1 is accepted

Sort by
0
Gert
Top achievements
Rank 1
answered on 09 Feb 2015, 01:52 PM
I have to change the default value of the resource combobox depending on various factors . (time, day,...)
Is to possible select an item in the combobox in the  
edit: function(e) { }
function and make it readonly ?
0
Gert
Top achievements
Rank 1
answered on 10 Feb 2015, 08:38 AM
Telerik, this is urgent. We cannot go live if this is not solved.
Our other topics are less important.

We need to select an item programmatically in the resource combobox when the popup opens/opened.
We cannot use the 'defaultValue' in the datasource's model, because the defaultValue is always different.

Possible options  :
1) is there a way to change the defaultValue in de models datasource directly/programmatically with Javascript ?
typeId: {from: "TypeID", defaultValue: ???, validation: {required: true}},
2) when the popup opens , select een item in the combobox en make the combobox readonly
3) custom validation, when 'none' is selected in the combobox.
    the form closes, when 'none' is selected, no errormessage occurs.

0
Gert
Top achievements
Rank 1
answered on 10 Feb 2015, 11:23 AM
Solved !
the add and save events are suitable for changing combobox selection.

add: function(e) {
                 e.event.typeId=4;
            },
            save: function(e) {
             e.event.typeId=4;
    },
Tags
Scheduler
Asked by
Gert
Top achievements
Rank 1
Answers by
Gert
Top achievements
Rank 1
Share this question
or