-
Notifications
You must be signed in to change notification settings - Fork 698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
syncfusion_flutter_datagrid cell textAligment #44
Comments
Thanks for contacting Syncfusion support. We have provided the appearance oriented APIs in DataGridCellStyle class. We have provided the alignment, padding, and all other formatting related APIs in GridColumn itself. Please find the below code snippet and UG documentation to achieve your requirement, https://help.syncfusion.com/flutter/datagrid/column-types#set-alignment-for-column @override
Widget build(BuildContext context) {
return Scaffold(
body: SfDataGrid(
source: _employeeDataSource,
columns: [
GridNumericColumn(mappingName: 'id', headerText: 'ID')
..textAlignment = Alignment.center
..headerTextAlignment = Alignment.center,
GridTextColumn(mappingName: 'name', headerText: 'Name'),
GridTextColumn(mappingName: 'designation', headerText: 'Designation'),
GridNumericColumn(mappingName: 'salary', headerText: 'Salary')
],
),
);
} |
Thanks @NeelakandanKannan |
I have seen when we showing data cell
cellStyle: DataGridCellStyle(
textStyle: TextStyle(fontSize: 10,),)
aligment of Text is missing please add Text Aligment its by default aligment left is showing
center, right etc is not showing just pass aligment params inside DataGridCellStyle() constructor
The text was updated successfully, but these errors were encountered: