Solved

formview combobox problem

Posted on 2011-09-06
4
291 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
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 250 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 250 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Why, and when, to use Windows Workflow 1 19
JavaScript error 1 33
Long URL in SMS 6 24
Setting runtime form location 4 19
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…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now