Defaulting the Subject or Making it Optional

5 posts, 0 answers
  1. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 21 Jun 2010 Link to this post

    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.
  2. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 21 Jun 2010 Link to this post

    Nevermind, didn't realize the event argument had a e.get_appointment() property, which I could call set_subject("Untitled"), and that worked.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kevin Price
    Kevin Price avatar
    49 posts
    Member since:
    Sep 2012

    Posted 25 Jun 2010 Link to this post

    Silly question for you Brian - what are you using to get a reference to the form?
  5. Brian Mains
    Brian Mains avatar
    485 posts
    Member since:
    Oct 2008

    Posted 25 Jun 2010 Link to this post

    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.
  6. Kevin Price
    Kevin Price avatar
    49 posts
    Member since:
    Sep 2012

    Posted 28 Jun 2010 Link to this post

    Thanks Brian!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017