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

GridView?

0 Answers 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 28 Jun 2011, 03:31 PM
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

No answers yet. Maybe you can help?

Tags
GridView
Asked by
ITA
Top achievements
Rank 1
Share this question
or