Jagged text in sfDataGrid

The text in the sfDataGrid cells and headers appears jagged. I have a native .net dataGridView in the same project set with the same font family, color and size as the sfDataGrid and its text looks smoother. It looks like there's no anti-aliasing applied to the sfDataGrid text. Check the attached images for better understanding.


How can I make the sfDataGrid text smoother?

Attachment: Jagged_Text_d91e9d9b.zip

11 Replies

DM Dhanasekar Mohanraj Syncfusion Team October 5, 2020 10:56 AM UTC

Hi Ahmad,

 
Thank you for using syncfusion controls

 
We have checked reported issue, and we are not clear with your reported scenario. Can you please provide the following details? 
 
1.       which device you are using and configuration details? 
2.       Syncfusion updated version  
3.       Issue reproducing steps or video (if possible) 
4.       Visual studio and .net framework versions  
5.       Share your sample (if possible) 
 
It will helpful for us to check on it and provide you with the solution at the earliest  
 
Regards,
Dhanasekar Mohanraj.
 



AH Ahmad October 7, 2020 06:20 AM UTC

Hi, here are the answers to your questions:

1.       which device you are using and configuration details?  --> I'm using WinForms on a Desktop
2.       Syncfusion updated version  --> latest version (18.3460.0.35)
3.       Issue reproducing steps or video (if possible) --> See below
4.       Visual studio and .net framework versions  --> VS 2019, .net framework 4.7.2
5.       Share your sample (if possible)  --> Shared. 


The provided VS 2019 project contains two forms: 
Dashboard
Add Delete Departments (this is where the sfDataGrid is located).

Once the application starts, the Dashboard will be loaded first, and then it will automatically load the "Add Delete Departments Form". 

Below are the steps to reproduce the problem:

1- Start the provided solution
2- Minimize the Dashboard form titled "One SpYder", and notice the other form titled "Add Delete Departments".
3- Notice how the font in sfDataGrid is jagged and that the sorting icons are not correct.
4- Stop the application

To fix the problem:

5- Open Dashboard.Designer.cs file
6- Comment out line 811:
this.Controls.Add(this.panel9);  // comment out this line and the problem disappears

Repeat steps 1-3, the text of the datagrid and the sorting icon should now look normal.

Another way to fix the problem:

7- Stop the application
8- Open Dashboard.Designer.cs file
9- Uncomment line 811 if it was commented
10- Comment both lines 322 and 326:

this.panel9.Dock = System.Windows.Forms.DockStyle.Fill; // comment out this line
this.panel9.Size = new System.Drawing.Size(1362, 639); // comment out this line

Repeat steps 1-3, the text of the datagrid and the sorting icon should now look normal.



DM Dhanasekar Mohanraj Syncfusion Team October 7, 2020 06:23 PM UTC

Hi Ahmad,

 
Thank you for your update.

 
We suspect you have missed to attach the sample, can you please attached the issue reproducing sample.

 
Regards,
Dhanasekar Mohanraj.



AH Ahmad October 8, 2020 03:41 AM UTC

Trying again to upload the project file. Hopefully it works this time.

Attachment: One_SpYder__Upload_62e4f8d3.zip


DM Dhanasekar Mohanraj Syncfusion Team October 8, 2020 01:25 PM UTC

Hi Ahmad,

 
Thank you for your update.

 
Based on provided details, we have checked your reported scenario. Unfortunately, we can’t able to the reproduced the reported issue from our end, please refer the below video link,

 
Can you please share us below things,

 
1.       Can you please share the machine configuration of issue produced system? 
2.       Can you please provide details or screenshot of Operating System used in issue produced system? 
3.       Can you please share the issue reproducing video.

 
It will be helpful for us to check on it and provide you the solution at the earliest

 
Regards,
Dhanasekar Mohanraj. 



AH Ahmad October 9, 2020 03:12 AM UTC

Hi Dhanasekar,

Actually, the video that you recorded did replicate the problem, but you need to look carefully at the text. Please retry the steps, in the "Add Delete Departments" form, look carefully at the text in the sfDataGrid, and see how the "A" in the last row "Add new department" looks jagged. To help you see the difference, I took a screen shot from your video, and put it side by side with another screen shot that I took it after applying the workaround (commenting out line 811). Notice how the text in your video is jagged while the other one is smooth.

I've also recorded a full video from my computer to show both scenarios: the jagged text and the smooth one.

Attachment: Jagged_Text_Screen_Shots_86f89a70.zip


MA Mohanram Anbukkarasu Syncfusion Team October 9, 2020 02:55 PM UTC

Hi Ahmad, 

Thanks for the update.  

We have created a new incident for this query in your account. Kindly have further follow-ups for this query in that incident.  

Regards, 
Mohanram A. 



TO Tobi April 8, 2021 09:02 AM UTC

Dear support, 

I have the same problem - was this problem ever resolved? I believe it must have something to do with High DPI setting or something similar. 

Tobi


MA Mohanram Anbukkarasu Syncfusion Team April 9, 2021 01:21 PM UTC

Hi Tobi,  

Thanks for the update.  

It seems you have created an incident for this same query. Kindly have further follow-ups for this query in that incident.  

Regards, 
Mohanram A. 



LB Leonardo Buasso May 19, 2022 05:22 PM UTC

Tengo el mismo problema



VS Vijayarasan Sivanandham Syncfusion Team May 20, 2022 02:37 PM UTC

Hi Leonardo Buasso,

We have prepared the simple sample in MS and checked the reported problem. The reported problem occurs also while using the Graphics.DrawString method with System.Windows.Forms.DataVisualization.Charting.Chart. So, we have asked query in Microsoft developer community forum. Please find the below link,


MSDN link: https://developercommunity.visualstudio.com/t/text-drawn-using-graphicsdrawstring-method-is-not/1225695

However, as per the answer provided for the query raised in the developer’s community, the reported issue is a GDI+ caching related issue when launching the second form in the Load event of the main form. It occurs only when launching the form in the load event and the workaround suggested to resolve this is not to launch the form in the load event. Kindly change the place of launching the form as suggested in the developer’s community solution.

Please let us know if you have any concerns about this.


Regards,
Vijayarasan S



Loader.
Up arrow icon