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

Defaulting the Subject or Making it Optional

4 Answers 47 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brian Mains
Top achievements
Rank 1
Brian Mains asked on 21 Jun 2010, 03:10 PM
Hello,

Our users don't use the subject field of the appointment... I want to make it optional (no validation) or default it to untitled, because there is a bug with client-side binding and loading the advanced form.

I try to default it like:

//form is the advanced form
form._getSubjectTextBox().set_value("Untitled");

But nothing is working, how to default the subject so the error doesn't appear off of the start?  Or, how do I make it optional so the radtextbox doesn't display the error off of the start...

Thanks.

4 Answers, 1 is accepted

Sort by
0
Brian Mains
Top achievements
Rank 1
answered on 21 Jun 2010, 03:12 PM
Nevermind, didn't realize the event argument had a e.get_appointment() property, which I could call set_subject("Untitled"), and that worked.
0
Kevin Price
Top achievements
Rank 1
answered on 25 Jun 2010, 07:41 PM
Silly question for you Brian - what are you using to get a reference to the form?
0
Brian Mains
Top achievements
Rank 1
answered on 26 Jun 2010, 01:22 AM
Hey,

Telerik has two methods: _getAdvancedEditTemplate and _getAdvancedInsertTemplate, DOM references to the templates.  To figure out whether editing or inserting, I just check which one is visible, though I'm sure there is an API-ish way of doing that (was in a hurry, and this worked).  I believe those methods were of the scheduler API.

This is where FireFox comes in handy :-)

HTH.
0
Kevin Price
Top achievements
Rank 1
answered on 28 Jun 2010, 04:46 PM
Thanks Brian!
Tags
Scheduler
Asked by
Brian Mains
Top achievements
Rank 1
Answers by
Brian Mains
Top achievements
Rank 1
Kevin Price
Top achievements
Rank 1
Share this question
or