Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
149205 | Nov 18,2019 10:16 PM UTC | Nov 25,2019 05:04 AM UTC | Xamarin.Android | 3 |
![]() |
Tags: SfDataGrid |
private void SfdataGrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnEventArgs e)
{
if (e.Column.HeaderText == "OrderID")
{
e.Column.CellTextSize = 20;
e.Column.TextAlignment = GravityFlags.End;
e.Column.HeaderText = "Customized OrderID";
}
} |
Hi Xamarin Hunter,
Thanks for contacting Syncfusion support.
Your requirement can be achieved by using AutoGeneratingColumn event of SfDataGrid. We have prepared sample for the same.
Please follow the below code example,
private void SfdataGrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnEventArgs e){if (e.Column.HeaderText == "OrderID"){e.Column.CellTextSize = 20;e.Column.TextAlignment = GravityFlags.End;e.Column.HeaderText = "Customized OrderID";}}
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/SfDataGridDemo_AutoGeneratingColumn-1190682623.zip
We hope this helps, please let us know if need further assistance from us.
Regards,Karthik Raja
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.