我可以在 Web Assembly 中使用 DataGrid 吗?
Can I use DataGrid in web assembly?
我一直在尝试让数据网格控件在我的 Web 程序集项目中工作。数据网格控件在 UWP 中工作正常,但在 Web Assembly 中,它只显示列表的 headers 但没有列表项。 (headers显示即使他们是auto-generated)。
我什至可以在 Web 程序集中使用 DataGrid,还是我必须将 ListView 用于表(或其他东西),还是我的代码?
我正在使用的 NuGet 包:Uno.Microsoft.Toolkit.Uwp.UI.Controls.DataGrid
(5.1.0-build.200.gf9c311b069)
<controls:DataGrid
Height="250"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AutoGenerateColumns="False"
ItemsSource="{Binding OpenCaseList}">
<controls:DataGrid.Columns>
<controls:DataGridTextColumn
Header="Id"
Binding="{Binding Id}" />
<controls:DataGridTextColumn
Header="Title"
Binding="{Binding Tittel}" />
<controls:DataGridTextColumn
Header="Comment"
Binding="{Binding Comment}" />
</controls:DataGrid.Columns>
</controls:DataGrid>
遗憾的是,此控件尚未针对 WASM 实现。
GitHub 上已经有关于此的问题。我建议您点赞并订阅它,以便您可以跟踪进度并提供任何反馈。
我一直在尝试让数据网格控件在我的 Web 程序集项目中工作。数据网格控件在 UWP 中工作正常,但在 Web Assembly 中,它只显示列表的 headers 但没有列表项。 (headers显示即使他们是auto-generated)。
我什至可以在 Web 程序集中使用 DataGrid,还是我必须将 ListView 用于表(或其他东西),还是我的代码?
我正在使用的 NuGet 包:Uno.Microsoft.Toolkit.Uwp.UI.Controls.DataGrid (5.1.0-build.200.gf9c311b069)
<controls:DataGrid
Height="250"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AutoGenerateColumns="False"
ItemsSource="{Binding OpenCaseList}">
<controls:DataGrid.Columns>
<controls:DataGridTextColumn
Header="Id"
Binding="{Binding Id}" />
<controls:DataGridTextColumn
Header="Title"
Binding="{Binding Tittel}" />
<controls:DataGridTextColumn
Header="Comment"
Binding="{Binding Comment}" />
</controls:DataGrid.Columns>
</controls:DataGrid>
遗憾的是,此控件尚未针对 WASM 实现。
GitHub 上已经有关于此的问题。我建议您点赞并订阅它,以便您可以跟踪进度并提供任何反馈。