Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
After upgrading from .net framework to .net6 ultragrid displays some double variables as infinite
posted

Hello,

I am using the UltraGrid control in version 23.1.52 on .NET 6 and after upgrading from .Net Framework 4.6.1 it displays some double variables as infinite. The value comes from a SQL query "ek.CLeNumber * ek.CLeSum AS Sum".

In the attached images you can see the list below is the standard ListView control and it differs from the UltraGrid by displaying the number correctly.

Could you please inspect it on your end?

This piece of code is very important part and is currently holding me from being able to release the software.

Please contact me if you need any more information.

Thanks in advance!

Greetings

Parents
  • 1700
    Verified Answer
    Offline posted

    Hello Nikolaus,

    I’ve tried to reproduce the issue with both .NET 6 and .NET 8 and on both I wasn’t able to reproduce it.

    Could you let me know how are you configuring the grid and its columns? Are you applying any formatting on the column that has the issue with the number formatting?

    Additionally, have you tried applying a Format for the column that limits the numbers after the decimal separator to 2 decimal places? How does the grid display the values after a format has been set?

    If you haven’t tried applying a format for the column, the following formats could be applied -  "#0.00" or "#.##". To apply the format of the column you can use the following code:

    this.ultraGrid1.DisplayLayout.Bands[0].Columns["Salary"].Format = "#0.00";

    Please try the suggested approach and let me know if it resolves the issue.

    If I am missing something in your scenario, please feel free to include it below. It would be ideal if you could provide a small sample that demonstrates the issue. Remove any external dependencies and code that is not directly related to the issue, zip your application and attach it in your reply.

    Having a working sample on my side, which I can debug, is going to be very helpful in finding the root cause of this behavior.

    Thank you for your cooperation.

    Looking forward to hearing from you.

    Regards,
    Ivan Kitanov

Reply Children