BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
In my .NET Maui program, I have a ContentPage with a DataGrid and DataForm.
In my xaml, I'm trying to change the DataForm's Height by setting the Grid.RowSpan to Grid.RowSpan=3 for example. However, the DataForm itself never changes height.
Here is a code snippet:
<StackLayout>
<Label Text="Patient Page"
HorizontalOptions="Center"
TextColor="White"
VerticalOptions="Center"
BackgroundColor="#512BD4" />
<Grid Padding="10,10,10,10">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<dataForm:SfDataForm x:Name="patientDataForm" Grid.Row="0" Grid.RowSpan="3" Grid.Column="2" Grid.ColumnSpan="2"
ColumnCount="2" />
<!--DataObject="{Binding Patient}"-->
<syncfusion:SfDataGrid x:Name="patientDataGrid" Grid.Row="0" Grid.RowSpan="0" Grid.Column="0" Grid.ColumnSpan="2"
How do I make the DataForm expand in size?
Hi Frederick
#Regarding Grid.RowSpan is not responding
As per the behavior of DataForm, if the height is set to infinity ( '*' or 'auto'), the DataForm will be rendered with the minimum height request. To increase the height of the DataForm, you can either increase the MinimumHeightRequest of DataForm or specify the grid row height using specific value. Please refer to the following code snippet for your reference.
Code Snippet
<StackLayout> <Label Text="Patient Page" HorizontalOptions="Center" TextColor="White" VerticalOptions="Center" BackgroundColor="#512BD4" /> <Grid Padding="10,10,10,10" > <Grid.RowDefinitions> <RowDefinition Height="200" /> <RowDefinition Height="100" /> <RowDefinition Height="100" /> <RowDefinition Height="20" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <dataForm:SfDataForm x:Name="patientDataForm" DataObject="{Binding ContactsInfo}" Grid.ColumnSpan="2" ColumnCount="2" Grid.Row="0" BackgroundColor="LightYellow" Grid.RowSpan="3" Grid.Column="2" /> <syncfusion:SfDataGrid x:Name="patientDataGrid" Grid.Row="0" Grid.RowSpan="1" Grid.Column="0" BackgroundColor="LightGreen" Grid.ColumnSpan="2"/> </Grid> </StackLayout> |
We have attached the testing sample in the following locations.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataFormMAUI-1803009209
Please let us know if you have any concerns.
Regards,
SaiGanesh Sakthivel