Error when using drop down list within AdvancedInsertTemplate

8 posts, 0 answers
  1. Chi
    Chi avatar
    7 posts
    Member since:
    Jan 2009

    Posted 16 Mar 2009 Link to this post

    Hi,

    I have created drop down lists within the <AdvancedInsertTemplate>...</AdvancedInsertTemplate> tag of a Rad scheduler. I set the Selected Value of the drop down list using the Bind method like SelectedValue='<%# Bind("TaskStatus") %>' (the TaskStatus is a custom attribute). When I insert a new appointment using the AdvancedInsertTemplate, it will give me the following error:

    Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

    I have done the same to the AdvancedEditTemplate without any error, anyone knows how to solve this problem please?

    Cheers
    Chi
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 19 Mar 2009 Link to this post

    Hi Chi,

    Since you are in InsertMode the TaskStatus is null.

    Why do you need the SelectedValue property set to a databound field in insert mode?



    Greetings,
    Veselin Vasilev
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Chi
    Chi avatar
    7 posts
    Member since:
    Jan 2009

    Posted 19 Mar 2009 Link to this post

    Hi,

    Thank you for your reply.
    I would like to let users select a value from the drop down list and insert to the database. Is that supposed to bind the selected value of the drop down list to the data source value and perform the insert procedure?

    Cheers,
    Chi
  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 Mar 2009 Link to this post

    Hello Chi,

    Actually, there is a kb article which demonstrates this functionality:
    http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-dropdownlist-controls-in-the-advanced-form.aspx


    Greetings,
    Peter
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  6. Terri-Lynn
    Terri-Lynn avatar
    45 posts
    Member since:
    Dec 2010

    Posted 30 Sep 2011 Link to this post

    Hi all:

    Can someone update the broken link above?  Thanks.

    As I've been using the forum a LOT the past week, there are a LOT of broken links.  A little frustrating.

    Thanks.
  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 03 Oct 2011 Link to this post

    Hi Terri-Lynn,

    Here is the link where you can find the article:
    http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx

    Best wishes,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  8. shahab
    shahab avatar
    58 posts
    Member since:
    Mar 2009

    Posted 02 May 2013 Link to this post

    I used RadDropDown to Filter Scheduler and set AutoPostback Properties, I got "Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.".
  9. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 07 May 2013 Link to this post

    Hi,

    Can you please clarify which of the controls you are using -  is it the RadAutoCompleteBox, the RadDropDownTree or the RadDropDownList? Can you also clarify what is the binding that you are using so we can test the scenario with this KB and determine what might be causing the exception that you get.

    Kind regards,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017