TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Iam Ajay
NA
11
4.3k
Combobox selected text not getting saved
Apr 5 2013 2:19 AM
I want to save the selected value from the combobox that is the text inside the combobox in database.
but the Id is getting saved in database.
The table name is Company with two colummns com_id and com_name in Database
<ComboBox Height="23" HorizontalAlignment="Left" Margin="67,21,0,0" Name="CmbOrg" VerticalAlignment="Top" Width="129" ItemsSource="{Binding Com_Name}" DisplayMemberPath="Com_Name"/>
created a domaincontext also domain service ...... using RIA Services
//to load the Company
DictionaryDomainContext orgdemo = new DictionaryDomainContext();
LoadOperation<Company> dict = orgdemo.Load(orgdemo.GetCompaniesQuery());
CmbOrg.ItemsSource = dict.Entities;
//the value code which is getting saved to Database
dc.Org_Name = CmbOrg.SelectedValue.ToString();
Reply
Answers (
3
)
Image Customization in Silverlight
Image Color Picker