Sir/Madam,
How to set Height and width of datagrid. We can increase the height of datagrid but I want to decrease the default height.
I want to set dataGrid with specific height and width other than the default height width.
How to fix GridTableSummaryRow to the bottom of the datagrid.
Thanking you.
Hi Amish,
Regarding “Fix GridTableSummaryRow to the bottom of the datagrid”
You can achieve your requirement by defining Position property of GridTableSummaryRow with value as Bottom . Please refer to our user guidelines documentation regarding Positioning TableSummaryRows in the below link.
UG link: https://help.syncfusion.com/xamarin/datagrid/summary#positioning-tablesummaryrows
Regarding “Set dataGrid with specific height and width other than the default height width”
We would like to let you know that by default the MinimumHeightRequest
and MinimumWidthRequest of SfDataGrid is 300. So that only SfDataGrid renderer
with default height and width value when we set HeightRequest or WidthRequest
less than minimum value.
You can achieve your requirement by setting
value to MinimumHeightRequest and MinimumWidthRequest based on your
requirement. Please let us know if you need any further assistance.
Regards,
Suja
Regarding “Set dataGrid with specific height and width other than the default height width”
My coding is a below and output image is attached in 1.png file.
<SfGrid:SfDataGrid x:Name="dataGrid" ColumnSizer="Star" HeaderRowHeight="25"
AllowEditing="false" AllowKeyboardNavigation="True" AllowSorting="True" AllowDraggingColumn="True"
IsEnabled="True" SelectionMode="Single" NavigationMode="Cell" EditTapAction="OnDoubleTap" EditorSelectionBehavior="SelectAll"
RowHeight="25" ImeOptions="Done" MinimumWidthRequest="500" MinimumHeightRequest="50" >
Regarding “Fix GridTableSummaryRow to the bottom of the datagrid”
I want to first height and width of the grid as per requirement and then set the tablesummary row at the bottom of the grid as shown in attached file 2.png.
Regarding “Set dataGrid with specific height and width other than the default height width”
You can resolve the reported scenario by defining the LayoutOptions to SfDataGrid accordingly, when the SfDataGrid doesn’t obtain finite size from its parent to layout in the View as below code snippet.
<sfgrid:SfDataGrid x:Name="dataGrid" GridStyle="{StaticResource customstyle}" ColumnSizer="Star" HeaderRowHeight="25" AllowEditing="false" AllowKeyboardNavigation="True" AllowSorting="True" AllowDraggingColumn="True" IsEnabled="True" SelectionMode="Single" NavigationMode="Cell" EditTapAction="OnDoubleTap" EditorSelectionBehavior="SelectAll" RowHeight="25" ImeOptions="Done" HeightRequest="100" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" WidthRequest="500" MinimumHeightRequest="0" ItemsSource="{Binding OrdersInfo}"> |
Please to our user guidelines documentation regarding the Loading the SfDataGrid with customized height and width in the below link.
Regarding “Fix GridTableSummaryRow to the bottom of the datagrid”
By default, GridTableSummaryRow renderer in the bottom of SfDataGrid when it define the with Position property with value as Bottom. We have attached a simple sample based on your requirement and attached here for your reference. You can customize the sample as per your wish. Please let us know if you need any further assistance.
We are glad to know that your problem has been resolved. Please let us know if you need any other assistance. We will be happy to assist you.