So many problems.
<datagrid:SfDataGrid.Columns>
<datagrid:GridTemplateColumn HeaderText="Day" MappingName="whatever" HeaderCellTextSize="18" Width="100" >
<datagrid:GridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid RowDefinitions="*,Auto,*" >
<Label Grid.Row="0" Text="July" FontAttributes="Bold" HorizontalTextAlignment="Center"></Label>
<Label Grid.Row="2" Text="{Binding Day , StringFormat='{}{0:dd}'}" FontAttributes="Bold" HorizontalTextAlignment="Center"></Label>
<Grid Grid.Row="1" ColumnDefinitions="Auto,Auto" BackgroundColor="Red">
<Label Grid.Column="0" Text="Worked"></Label>
<CheckBox Grid.Column="1" IsChecked="{Binding Worked}"></CheckBox>
</Grid>
</Grid>
</DataTemplate>
</datagrid:GridTemplateColumn.CellTemplate>
</datagrid:GridTemplateColumn>
Now if I change the Grid.Row of each to the item a different WRONG display is offered. The only thing worse is using a StackLayout because I have found that Syncfusion and StackLayout are not in any way compatible.
Seems like the row height (which you have no control over is set by the control and any desire by the developer (and isn't that what 3rd party controls are supposed to do) to change it is not happening. I noticed that WPF has a fix for both the above so I am confused.
Oh and it gets better (not really).
Changed XAML to the following just to see how screwed up this is.
<datagrid:GridTemplateColumn HeaderText="Day" MappingName="whatever" HeaderCellTextSize="18" Width="100" >
<datagrid:GridTemplateColumn.CellTemplate>
<DataTemplate>
<Grid HeightRequest="500" RowDefinitions="*,*">
<Grid Grid.Row="0" BackgroundColor="Red"></Grid>
<Grid Grid.Row="1" BackgroundColor="Blue"></Grid>
</Grid>
<!--<Grid RowDefinitions="Auto,Auto,Auto" >
<Label Grid.Row="2" Text="July" FontAttributes="Bold" HorizontalTextAlignment="Center"></Label>
<Label Grid.Row="1" Text="{Binding Day , StringFormat='{}{0:dd}'}" FontAttributes="Bold" HorizontalTextAlignment="Center"></Label>
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto" BackgroundColor="Red">
<Label Grid.Column="0" Text="Worked"></Label>
<CheckBox Grid.Column="1" IsChecked="{Binding Worked}"></CheckBox>
</Grid>
</Grid>-->
</DataTemplate>
</datagrid:GridTemplateColumn.CellTemplate>
</datagrid:GridTemplateColumn>
I can set the overall grid heightrequest to any value and it has no effect. 100,200,500.
So you cannot set the height / it does not resize according to content / it is basically useless.
Oh and one more.
Oh cannot post it as you don't like (oh can't show you). Your message about not posting should post the word.
Hi Lloyd,
Currently, we are validating the reported scenario on our end. We will update you with further details on or before July 6, 2022. We appreciate your patience and understanding.
Regards,
Suja
Hi Lloyd,
|
Regarding scenario “Set the overall grid heightrequest to any value and it has no effect”
|
You can resolve the scenario by setting SfDataGrid row height based on the content using QueryRowHeight as like below code snippet
Code Snippet:
Please refer our user guidelines documentation regarding Auto fit row based on content.
We have attached a sample which we prepared with a provided code snippet with illustration video for your reference. |
|
|
Regarding Scenario “Syncfusion and StackLayout are not in any way compatible”
and
“change the Grid.Row of each to the item a different WRONG display is offered”
|
We have checked both reported scenarios, we unable to replicate the reported scenario on our end. We didn’t found any issue while using StackLayout with SfDataGrid and item gets displayed properly while changing Grid.Row. Please revert to us with simple sample with illustration video to proceed further on this. Could you please confirm in which platform you are facing the reported scenario? |
Regards,
Suja