Solved

formview combobox problem

Posted on 2011-09-06
4
292 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 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