【发布时间】:2011-05-22 08:08:45
【问题描述】:
我想将原始 xml 文件绑定到数据网格并使用 C# 在 WPF 表单上显示它。我打算使用数据集来存储我的 xml,然后将数据集绑定到数据网格。我的 xml 看起来像这样
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<games>
<game id="123456" name="501">
<player id="1">
<name>john</name>
<score>495</score>
<movesLeft>15</movesLeft>
<won>No</won>
<completed>uncompleted</completed>
</player>
<player id="2">
<name>
konj
</name>
<score>501</score>
<movesLeft>15</movesLeft>
<won>No</won>
<completed>uncompleted</completed>
</player>
</game>
</games>
我计划使用两个数据网格,一个用于,一个用于 列 id、name、movesLeft、won、completed 绑定到元素
【问题讨论】:
标签: c# wpf xml datagrid dataset