?
Solved

formview combobox problem

Posted on 2011-09-06
4
Medium Priority
?
297 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

771 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