All Products
Demos
Pricing
Services
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
Input
/
Implementing two way binding for non databound controls
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
2 posts, 0 answers
Stephen Cossgrove
7 posts
Member since:
Nov 2009
Posted 14 Dec 2009
Link to this post
Hi
i am currently trying to bind a object property to a RadTextBox and am getting the following error when using the <%# Bind(DataItem.Name) %> method:
System.InvalidOperationException: Databinding methods such as Eval(), XPath(),
and Bind() can only be used in the context of a databound control.
I can bind using the following, but it is only one way:
%# DataBinder.Eval(this, "DataItem.Name") %
>
How can i get two way binding?
Pavlina
Admin
6187 posts
Posted 17 Dec 2009
Link to this post
Hello Stephen,
To perform two-way binding you could use this method:
Text='<%# Bind("Name") %>'
For more information, please refer to this help topic:
Two-way declarative binding
Kind regards,
Pavlina
the Telerik team
Instantly find answers to your questions on the new
Telerik Support Portal
.
Watch a
video
on how to optimize your support resource searches and
check out more tips
on the blogs.
Back to Top
Close