XAML SfDataGrid使用MAUI和.NET 7与现有内容重叠

xggvc2p6  于 2023-02-01  发布在  .NET
关注(0)|答案(1)|浏览(142)

我使用SfDataGrid插件创建了一个表,并使用标准的Stacklayout模板加载其他数据。
我将这两个都包含在<Grid>中。但是,这两个都加载,它们加载在彼此的顶部/table下面
页面的一般层次结构如下

<Grid>
      //declare Grid and following columns
      <syncfusion:SfDataGrid>

            <syncfusion:SfDataGrid.Columns>

            </syncfusion:SfDataGrid.Columns>

    </syncfusion:SfDataGrid>
    
       
   //Declare Dropdowns and filters contained in a StackLayout
 
    <StackLayout Grid.Row="3" Grid.Column="0" Grid.RowSpan="5">
    </StackLayout>

 </Grid>

此图像演示了发生的问题。正如您所看到的,辅助数据(下拉列表)重叠在表数据的顶部,而它应该位于底部
Output

gcuhipw9

gcuhipw91#

您必须指定每个元素应该出现的行和列,否则它们将在0,0中一个在另一个的上面。这在文档中有介绍

<Label Grid.Row="5" Grid.Column="2" ... />

相关问题