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

Error when using drop down list within AdvancedInsertTemplate

7 Answers 139 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
VetlinkPRO
Top achievements
Rank 1
VetlinkPRO asked on 17 Mar 2009, 02:18 AM
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

7 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 19 Mar 2009, 03:04 PM
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.
0
VetlinkPRO
Top achievements
Rank 1
answered on 19 Mar 2009, 07:38 PM
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
0
Peter
Telerik team
answered on 22 Mar 2009, 02:59 PM
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.
0
Terri-Lynn
Top achievements
Rank 1
answered on 30 Sep 2011, 04:18 PM
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.
0
Kate
Telerik team
answered on 03 Oct 2011, 12:03 PM
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
0
shahab
Top achievements
Rank 1
answered on 02 May 2013, 05:20 AM
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.".
0
Kate
Telerik team
answered on 07 May 2013, 12:23 PM
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.
Tags
Scheduler
Asked by
VetlinkPRO
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
VetlinkPRO
Top achievements
Rank 1
Peter
Telerik team
Terri-Lynn
Top achievements
Rank 1
Kate
Telerik team
shahab
Top achievements
Rank 1
Share this question
or