Hello everyone,
I don’t know if this problem has already been mentioned, but I tried to search and I didn’t find anything similar or any solution. I implemented HTML in my datagrid (and I’m sure the HTML is well constructed, I made a messagebox to test). I basically add an <img> to the datagrid, and some appear but others are just blank in the rows and don’t show any results. Check the images in attachment to understand better. The scroll is very buggy and when LOAD it takes a long time to show results as shown in attachment 1.png. And in attachment 2.png we can notice that the rows are empty all of a sudden, and after about 40/60 rows (it’s random), it shows other results again. Is there any fix with this? I tried applying Datagridview1.update and refresh but it didn’t work.
And i don’t think its bad PC performance, im using Ryzen 7 5800H, so pretty sure there’s no problem with CPU.
Video Example: https://youtu.be/extgk6qUdUk
Download Case Test: https://drive.google.com/file/d/1VhzdhI4xZwKx6-NosBrvKvUK275HS4Pb/view?usp=sharing
Edit: This seems to happen when there are multiple rows to add to the datagrid. I’m running this in an Application.StartTask Async method!
Edit 2: Seems that in the video when i click in a row it opens a window, it means that the text is there but the cell still look empty.
Thank you all.
Hi Ruben,
We’re still trying to reproduce the issue you mentioned.
However, I wanted to give you some pointers on how to handle DataGridView with lots of data and/or rows.
I would highly suggest that you use the “Virtual Mode” by setting the VirtualMode property to true.
With that, you can use the CellValueNedded to fill your DGV after setting a RowCount.
Also, you can completely get rid of Application.StartPolling() and Application.EndPolling() since they don’t work when you’re app has WebSocket enabled.
I have attached a slightly modified version of your app to see the changes 🙂
Also, your HTML is correct yes, but it’s not semantically correct. If you inspect the content of a cell you’ll see that you have a “<style>” tag right before the “<img>” tag. It’s really a small thing but I just wanted to let you know!
If you implement the approach I mentioned above, you’ll be able to notice significant performance boost.
We’ll keep you updated as soon as we can reproduce!
HTH,
Alaa
//
Hi Ruben,
please provide a runnable test case to show how you fill the table and the HTML you´re using.
Best regards
Frank
Please login first to submit.