Smaug
Smaug

Reputation: 2673

XmlDataSource binding doesn't display result in properly

I've binded the ComboBox with Xml Datasource, I want to display the data is like Day, Month and Year one by one in the ComboBox. But now it displays DayMonthYear in ComboBox.

How can I acheive this?

<RecordSet>
    <Rows>
        <Row>Day</Row>
        <Row>Month</Row>
        <Row>Year</Row>
    </Rows>
</RecordSet>

 <ComboBox Grid.Row="1" Grid.Column="1" Name="MyDependCombo" ItemsSource="{Binding}">
        <ComboBox.DataContext>
            <XmlDataProvider Source="/Data/MyContentYearData.xml" XPath="/RecordSet/Rows"/>
        </ComboBox.DataContext>
</ComboBox>

The answers would be greatly appreciated.

Upvotes: 0

Views: 40

Answers (1)

paul
paul

Reputation: 22001

XPath="/RecordSet/Rows/Row"

...(28,29,30)

Upvotes: 1

Related Questions