Click here to Skip to main content
15,911,039 members
Home / Discussions / C#
   

C#

 
QuestionC# - Changing the data in the database Pin
Alessandra7712-Apr-08 9:14
Alessandra7712-Apr-08 9:14 
GeneralRe: C# - Changing the data in the database Pin
Christian Graus12-Apr-08 14:13
protectorChristian Graus12-Apr-08 14:13 
GeneralRe: C# - Changing the data in the database Pin
Alessandra7712-Apr-08 23:25
Alessandra7712-Apr-08 23:25 
GeneralLabel / Form Resizing Pin
danielk_12-Apr-08 5:25
danielk_12-Apr-08 5:25 
GeneralRe: Label / Form Resizing Pin
Anthony Mushrow12-Apr-08 5:46
professionalAnthony Mushrow12-Apr-08 5:46 
GeneralRe: Label / Form Resizing Pin
Luc Pattyn12-Apr-08 7:23
sitebuilderLuc Pattyn12-Apr-08 7:23 
GeneralPreFilterProperties Pin
danielk_12-Apr-08 5:24
danielk_12-Apr-08 5:24 
QuestionProblems to get SelectedValue from binded ComboBox Pin
Stefan Kneitz12-Apr-08 5:06
Stefan Kneitz12-Apr-08 5:06 
Hello,
i have a combobox binded in the xaml code to an xml file:
<stackpanel.resources>
<xmldataprovider>
x:Key="AufgabenlisteXml"
XPath="Aufgaben/Fachgebiet"
Source=".\Aufgabenliste.xml">



<combobox horizontalalignment="Left" x:name="ComboBoxFach" selectedindex="1">
DataContext="{StaticResource AufgabenlisteXml}"
ItemsSource="{Binding}"
IsSynchronizedWithCurrentItem="True">
<combobox.itemtemplate>
<datatemplate>
<textblock text="{Binding XPath=@FachName}">




The ComboBox works fine, but when i try to use the selected value in my Code i just get back an empty string.
Code i tried:

String new = ComboBoxFach.Text.ToString();
or
String new = ComboBoxFach.SelectedValue.ToString();

Other propertys of the ComboBox can be read. For example the SelectedIndex is shown correctly.
I think the problem is cause of the data binding cause i`m new to these concept.

Hope someone can help.
Thanks for answers.
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Anthony Mushrow12-Apr-08 5:17
professionalAnthony Mushrow12-Apr-08 5:17 
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Stefan Kneitz12-Apr-08 5:22
Stefan Kneitz12-Apr-08 5:22 
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Anthony Mushrow12-Apr-08 5:27
professionalAnthony Mushrow12-Apr-08 5:27 
GeneralRe: Problems to get SelectedValue from binded ComboBox Pin
Stefan Kneitz12-Apr-08 5:45
Stefan Kneitz12-Apr-08 5:45 
Generalcalculate elapsed seconds Pin
George_George12-Apr-08 4:47
George_George12-Apr-08 4:47 
GeneralRe: calculate elapsed seconds Pin
Anthony Mushrow12-Apr-08 5:10
professionalAnthony Mushrow12-Apr-08 5:10 
GeneralRe: calculate elapsed seconds Pin
George_George12-Apr-08 20:14
George_George12-Apr-08 20:14 
GeneralRe: calculate elapsed seconds Pin
Luc Pattyn12-Apr-08 7:21
sitebuilderLuc Pattyn12-Apr-08 7:21 
GeneralRe: calculate elapsed seconds Pin
George_George12-Apr-08 20:13
George_George12-Apr-08 20:13 
GeneralRe: calculate elapsed seconds Pin
PIEBALDconsult13-Apr-08 5:39
mvePIEBALDconsult13-Apr-08 5:39 
GeneralRe: calculate elapsed seconds Pin
George_George13-Apr-08 17:54
George_George13-Apr-08 17:54 
GeneralRe: calculate elapsed seconds Pin
PIEBALDconsult13-Apr-08 18:31
mvePIEBALDconsult13-Apr-08 18:31 
GeneralRe: calculate elapsed seconds Pin
George_George14-Apr-08 2:57
George_George14-Apr-08 2:57 
GeneralInverted text on image Pin
Kir Birger12-Apr-08 4:30
Kir Birger12-Apr-08 4:30 
GeneralRe: Inverted text on image [modified] Pin
Anthony Mushrow12-Apr-08 4:45
professionalAnthony Mushrow12-Apr-08 4:45 
GeneralA question about web browser control. Pin
bg198712-Apr-08 3:58
bg198712-Apr-08 3:58 
GeneralRe: A question about web browser control. Pin
Anthony Mushrow12-Apr-08 4:42
professionalAnthony Mushrow12-Apr-08 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.