Possible Bug in the DataGridView size calculation

Answered
0
0

Hello everyone,

we encountered a problem in our data grids. After some debugging I think the problem is related to a bug in the JavaScript, that is used to calculate the size of the cells.

The problem

We use multiple datagrids and as soon as one datagrid got displayed, the columns of the other grids were all but one sized with a width of “0”. So they were not visible and the first column took the whole space in the row.

After some error searching we recognized that the error is caused, by using different font settings in the grids (One was set to Verdana and the other to the themes default, which should be Verdana as well).

So as soon as second grid with a different font setting gets shown, it breaks and only shows one column.

Furthermore, we encountered an exception in the Chrome dev tools, which confirms our suspicion.

JavaScript error

The JavaScript method measure tries to access the variable “elStyle”, but this variable only gets defined if the measure element does not exist.
The block that contains the problematic line is only called, if the style of the element changed from the previously measured element.

Therefore, the exception gets thrown.

Reproduction

Place two grids into an application and change the font setting of one.

Error message

Please find a screenshot of the JavaScript within the chrome debugger attached. It displays the exception and problematic line.

Sample project

In addition, I attached a sample project, which demonstrates the behavior.

The buttons each open a window containing a gridview with different font settings and filled with sample data.
Both grids are exactly the same – other than the font setting – and should display 3 columns.

 

Can you please check, if this is a bug within Wisej?
Please let me know if I can provide additional information.

 

  • You must to post comments
Best Answer
0
0

Hi Florian,

#2277 is fixed in Wisej release 2.1.70.

Best regards
Frank

  • You must to post comments
0
0

Hi Florian,

thanks for spotting this and providing detailed information and a test case!

We have logged this issue as #2277 and a fix will be included in the next Wisej build.

Best regards
Frank

  • You must to post comments
0
0

Hi Florian

Efectibly there are a bug in the configuration that comments
This happend in all mayor browsers supported
For now, the only that not show the error is IE11

I will report to the development team for this problem and inform you when the correction are done.

Regards and happy codding

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.