Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

formview combobox problem

Posted on 2011-09-06
4
Medium Priority
?
299 Views
Last Modified: 2012-05-12
here the thing happening on my formview.. I have a country field that I have a code for the Item template this
<td >
                                                        Country:<br />
                                                        <asp:TextBox runat="server" ID="txtCountry" ReadOnly="true"
                                                            Text='<%#Bind("countryName") %>' />
                                                    </td>

and for the editTemplate same thing gets combo box for users to select from countries
 <td >
                                                        Country:<br />
                                                        <telerik:RadComboBox ID="cbCountry" runat="server"  
                                                           
                                                             DataSourceID="dsCountry" DataTextField="Country"
                                                            DataValueField="CountryCode">
                                                        </telerik:RadComboBox>                                                      
                                                    </td>

and update parameters I have this as a  for the update sp..
 <asp:Parameter Name="countryCode" Type="String" />

what happens is formview first loads gives me country name as United State on textbox.. Then  on edit form, it shows my combobox and shows United States as a country, but than if I go back to textbox mode I see nothing under the country textbox.. why this happening dont know? any idea?
0
Comment
Question by:1jaws
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 750 total points
ID: 36493624
Bind is unidirection. To use bidirectional (between application and DB) use Eval instead in your code.
0
 
LVL 7

Assisted Solution

by:kovilpattiBalu
kovilpattiBalu earned 750 total points
ID: 36493874
use like this..

DataBinder.Eval(Container, "DataItem.countryName")
0
 

Author Comment

by:1jaws
ID: 36496956
this didnt work because it gives me what I want when page first loads but than after update that happens, thinking something to do with update..
0
 

Author Closing Comment

by:1jaws
ID: 36540553
it is not a solution just the thank you both for effort
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question