GridView?

1 posts, 0 answers
  1. ITA
    ITA avatar
    383 posts
    Member since:
    Aug 2009

    Posted 28 Jun 2011 Link to this post

    Hi,

    GridView with XML works fine...

                                                                    <Grid.Resources>
                                                                        <XmlDataProvider x:Key="MODSource" Source="settings\module.xml" XPath="//Attributes/Attribute[@AttributeGroup='Template']"></XmlDataProvider>
                                                                    </Grid.Resources>
                                                                    <telerik:RadGridView Visibility="Visible" Name="radGridView1" AutoGenerateColumns="False" ItemsSource="{Binding Source={StaticResource MODSource}}" ShowGroupPanel="False">
                                                                        <telerik:RadGridView.Columns>
                                                                            <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Name] }" Header="Name">
                                                                                <telerik:GridViewDataColumn.CellTemplate>
                                                                                    <DataTemplate>
                                                                                        <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Name\']}">
                                                                                        </ContentControl>                                                                                       
                                                                                    </DataTemplate>
                                                                                </telerik:GridViewDataColumn.CellTemplate>
                                                                            </telerik:GridViewDataColumn>                                                                      
                                                                            <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\Version] }" Header="Version">
                                                                                <telerik:GridViewDataColumn.CellTemplate>
                                                                                    <DataTemplate>
                                                                                        <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'Version\']}">
                                                                                        </ContentControl>
                                                                                    </DataTemplate>
                                                                                </telerik:GridViewDataColumn.CellTemplate>
                                                                            </telerik:GridViewDataColumn>
                                                                            <telerik:GridViewDataColumn DataMemberBinding="{Binding XPath=ContentAttribute[@AttributeName\=\beschr] }" Header="Beschreibung" Width="*">
                                                                                <telerik:GridViewDataColumn.CellTemplate>
                                                                                    <DataTemplate>
                                                                                        <ContentControl Content="{Binding XPath=ContentAttribute[@AttributeName\=\'beschr\']}">
                                                                                        </ContentControl>
                                                                                    </DataTemplate>
                                                                                </telerik:GridViewDataColumn.CellTemplate>
                                                                            </telerik:GridViewDataColumn>
                                                                        </telerik:RadGridView.Columns>
                                                                    </telerik:RadGridView>

    But how can i add a boolean Column out of my xml file: <ContentAttribute AttributeName="Aktiv">Ja</ContentAttribute>


    Thanks
    Regards
    Rene
Back to Top