[XAML]
<sfGrid:SfDataGrid
x:Name="dataGrid"
AutoGenerateColumns="False"
ColumnSizer="Star"
ItemsSource="{Binding OrderInfoCollection}"
<sfGrid:SfDataGrid.Columns>
<sfGrid:GridTextColumn MappingName="OrderID" HeaderText="Codigo"></sfGrid:GridTextColumn>
<sfGrid:GridTextColumn MappingName="CustomerID" HeaderText="Nombre"></sfGrid:GridTextColumn>
</sfGrid:SfDataGrid.Columns>
</sfGrid:SfDataGrid>
[.CS]
…..
dataGrid.QueryRowHeight += DataGrid_QueryRowHeight;
…...
private void DataGrid_QueryRowHeight(object sender, Syncfusion.SfDataGrid.XForms.QueryRowHeightEventArgs e)
{
if (e.RowIndex == 0)
{
e.Height = 60;
}
e.Handled = true;
} |
|
[XAML]
<sfGrid:SfDataGrid
x:Name="dataGrid" AutoGenerateColumns="False"
ColumnSizer="Star"
ItemsSource="{Binding OrderInfoCollection}" HeaderRowHeight="60">
<sfGrid:SfDataGrid.Columns>
<sfGrid:GridTextColumn MappingName="OrderID" HeaderText="Codigo"></sfGrid:GridTextColumn>
<sfGrid:GridTextColumn MappingName="CustomerID" HeaderText="Nombre"></sfGrid:GridTextColumn>
</sfGrid:SfDataGrid.Columns>
<sfGrid:SfDataGrid.StackedHeaderRows>
<sfGrid:StackedHeaderRow>
<sfGrid:StackedHeaderRow.StackedColumns>
<sfGrid:StackedColumn MappingName="OrderID" ChildColumns="OrderID,CustomerID" Text="Registros encontrados:11">
</sfGrid:StackedColumn>
</sfGrid:StackedHeaderRow.StackedColumns>
</sfGrid:StackedHeaderRow>
</sfGrid:SfDataGrid.StackedHeaderRows>
</sfGrid:SfDataGrid>
[.CS]
…….
dataGrid.QueryRowHeight += DataGrid_QueryRowHeight;
……..
private void DataGrid_QueryRowHeight(object sender, Syncfusion.SfDataGrid.XForms.QueryRowHeightEventArgs e)
{
if (e.RowIndex == 0)
{
e.Height = 30;
}
else if(e.RowIndex == 1)
{
e.Height = 60;
}
e.Handled = true;
} |
|