This is a migrated thread and some comments may be shown as answers.

Binding to a Formview Control

2 Answers 101 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Paul Corbett
Top achievements
Rank 1
Paul Corbett asked on 30 Jan 2008, 10:35 AM
Hi

maybe this is a newbie question and has been answered in previous threads but after searching around I could not find an answer to my needs.

I have a combobox within a formview. The formview is initially in insert or edit mode. I have a lookup source binded to the combo. I want to be able to bind the value to a db field and on edit mode show the selected value reflecting what is stored in the db.

The formview is using an objectdatasource.

any help will be greatly appreciated.


2 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 30 Jan 2008, 02:43 PM
Hi Chris Lekkas,

What about binding the SelectedValue as shown in the following example:
Combo in Grid

Regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
zadiggle
Top achievements
Rank 1
answered on 15 Oct 2008, 02:13 PM

 

 

A way I solve this problem was to put a hidden textbox that binds to the database.  When the combobox changes tell it to update the textbox value on the client side or do it via the OnBinding event.  Works like a charm and no need for a ton of streaming files:

 

 

 

 

<telerik:RadComboBox ID="RadComboBoxAccounts" runat="server" DataSourceID="EntityDataSourceCampaignsAccounts" DataTextField="Name" DataValueField="ID"> <CollapseAnimation Duration="200" Type="OutQuint" /></telerik:RadComboBox>

<asp:TextBox ID="TextBoxAccount" Visible="false" runat="server"></asp:TextBox>

 

Tags
ComboBox
Asked by
Paul Corbett
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
zadiggle
Top achievements
Rank 1
Share this question
or