We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to change the font in gridCell to bold.

Thread ID:

Created:

Updated:

Platform:

Replies:

145574 Jun 28,2019 12:13 PM UTC Jul 12,2019 07:22 AM UTC Xamarin.Forms 6
loading
Tags: SfDataGrid
Bartosz Kleszcz
Asked On June 28, 2019 12:13 PM UTC

Hello,

I would like to change the font in the one row to bold.
I used:

```
public void SfDataGridOnQueryRowStyle(object sender, QueryRowStyleEventArgs e)
        {
               (...)
            e.Style.BackgroundColor =  Color.WhiteSmoke;
            e.Style.ForegroundColor = Color.White;
            e.Handled = true;
        }
```

but in the style properties I have only the foreground and background colors.
How can I define a new style for font bold?

Rgds,
BK

Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 1, 2019 11:27 AM UTC

Hi Bartosz, 
 
Thank you for contacting Syncfusion support. 
 
Your requirement of Customizing Grid cell Font can be achieved using QueryCellStyle event in DataGrid. In that you can use FontAttribute of Style to customize the same. You can customize the row based on requirement applying condition with Grid cell, 
 
[C#] 
dataGrid.QueryCellStyle += DataGrid_QueryCellStyle; 
 
private void DataGrid_QueryCellStyle(object sender, QueryCellStyleEventArgs e) 
{ 
     e.Style.FontAttribute = FontAttributes.Bold; 
} 
 
But there is an issue with this property, that we have already found and fixed the issue internally from our end. This issue fix will be included in our upcoming 2019 Volume 2 main release which is expected to be available by mid of this month July 2019. We appreciate your patience until then. 
  
Regards,
Subburaj Pandian V  


Bartosz Kleszcz
Replied On July 1, 2019 12:09 PM UTC

Hi,
Thank you for the solution


I didn't know that I can get the RowIndex property from QueryCellStyleEventArgs.
Thank you for help.

Rgds,
BK

Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 1, 2019 12:19 PM UTC

Hi Bartosz,  
  
Thank you for the update. 
 
Yes, you can use either RowIndex and RowData as well. As mentioned, we will include the issue fix in our Volume 2 release and let you know once it has been rolled out. We appreciate your patience until then. 
 
Regards,
Subburaj Pandian V  


Bartosz Kleszcz
Replied On July 2, 2019 04:45 PM UTC

On the android platform, the bold font works correctly:

e.Style.FontAttribute = FontAttributes.Bold;

but on iOS does not work. Is this the error you were writing about and
will be fix in July?


Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 3, 2019 09:09 AM UTC

Hi Bartosz,   
   
Thank you for the update.  
  
Yes, we have mentioned the same issue. In Android, it is working because of LoadUIView default value is false as default. As we mentioned, we will include this issue fix in our Volume 2 main release and let you know once it has been rolled out. We appreciate your patience until then.  
  
Regards,
Subburaj Pandian V   


Subburaj Pandian Veluchamy [Syncfusion]
Replied On July 12, 2019 07:22 AM UTC

Hi Bartosz, 
  
We are glad to announce that our Essential Studio 2019 Volume 2 Release version 17.2.0.34 is rolled out with the reported issue fix and is available for download under the following link. 
  
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
  
Regards,
Subburaj Pandian V 


CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon