如何使用xmldatasource在gridview中显示数据

时间:2011-07-28 08:25:12

标签: c# asp.net xml

我的代码是:

<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="XmlDataSource1" 
                                CellSpacing="0" DataMember="TITLE" GridLines="None">
                                <MasterTableView DataMember="TITLE" DataSourceID="XmlDataSource1">
                                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                        <HeaderStyle Width="20px" />
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                        <HeaderStyle Width="20px" />
                                    </ExpandCollapseColumn>
                                    <EditFormSettings>
                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>
                                </MasterTableView>
                                <FilterMenu EnableImageSprites="False">
                                </FilterMenu>
                                <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                </HeaderContextMenu>
                            </telerik:RadGrid>
                            <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/Bin/xml.xml" EnableCaching="false">
                            </asp:XmlDataSource>

当我调试它时,它说“无法在数据源中的项目中找到任何可绑定属性 ..我该怎么办?请帮助:/

1 个答案:

答案 0 :(得分:1)