How to change the columns FontSize and InputScope in UWP DataGrid?
In SfDataGrid, TextBlock is initially loaded for displaying the data. When you enter edit mode, SfNumericTextBox is loaded for GridNumericColumn.
Changing InputScope of SfNumericTextBox
By override the OnCreateEditUIElement () from the GridCellNumericRenderer you can change the InputScope directly to SfNumericTextBox.
C#
this.sfDataGrid.CellRenderers.Remove("Numeric"); this.sfDataGrid.CellRenderers.Add("Numeric", new GridCellNumericRendererExt()); public class GridCellNumericRendererExt : GridCellNumericRenderer { public GridCellNumericRendererExt() { } protected override Syncfusion.UI.Xaml.Controls.Input.SfNumericTextBox OnCreateEditUIElement() { var element = base.OnCreateEditUIElement(); InputScope scope = new InputScope(); InputScopeName name = new InputScopeName(); name.NameValue = InputScopeNameValue.Number; scope.Names.Add(name); element.InputScope = scope; return element; } }
Changing FontSize of SfNumericTextBox
The font size of SfNumericTextBox can be changed by writing style as below,
XAML
<Style TargetType="Syncfusion:SfNumericTextBox"> <Setter Property="FontSize" Value="20"/> </Style>
Samples:
WinRT: CustomizeGridNumericColumn_WRT
UWP: CustomizeGridNumericColumn_UWP
Conclusion
I hope you enjoyed learning about how to change the columns FontSize and InputScope in UWP DataGrid.
You can refer to our UWP DataGrid feature tour page to know about its other groundbreaking feature representations. You can also explore our UWP DataGrid documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!