XPTable Scrolling makes a mistake

I use XPTable to store values ​​in my winform application. His work is beautiful and has many functions. But I am facing a problem while scrolling through a table. If the scroll point is in the middle of the table and I import some data into the table, unexpectedly a strange image is displayed in the table, as shown below.

Weird result of table

Anyway, to avoid this problem? Is it related to painting? I searched the net more for this issue, but found nothing. Can anyone use this xptable to answer me?

Edit: XPtable is 32-bit, but I use it on the 64-bit version. is the cause of the error? other functions work fine.

What I do, I get user input through a text file and loading these values ​​into the database. After that, I get the values ​​from the database and import them into the table as follows. (Due to the large data in the text file, I save the db and retrieve it. Otherwise, it will freeze or take too long.

 foreach (var tokens in list2) { string uname = tokens.name; if (string.IsNullOrWhiteSpace(uname)) { uname = ""; } Row r = new Row(); r.Cells.Add(new Cell(snumber, Color.FromArgb(232, 79, 79), Color.White, f1)); r.Cells.Add(new Cell(uname, Color.FromArgb(232, 79, 79), Color.White, f1)); r.Cells.Add(new Cell(tokens.Token, Color.FromArgb(232, 79, 79), Color.White, f1)); r.Cells.Add(new Cell(tokens.Campaign, Color.FromArgb(232, 79, 79), Color.White, f1)); r.Cells.Add(new Cell("", (Image)new Bitmap(10, 10))); r.Cells.Add(new Cell("", (Image)new Bitmap(10, 10))); r.Cells.Add(new Cell("", (Image)new Bitmap(10, 10))); r.Cells.Add(new Cell("", (Image)new Bitmap(10, 10))); this.Invoke(new MethodInvoker(delegate { tableModel1.Rows.Add(r); })); snumber++; } 

If the scrollbar is in the starting position, this does not cause any problems. In this weird image, if I click anywhere the cell value is displayed. Its totally weird :(

+7
c # winforms xptable
source share
1 answer

I ran into the same issue with another third-party control. The red cross that I came across happens when calls are not correctly sorted by main / user thread when using the control. I see that your marshalling causes control, apparently, you are accessing the control from another thread.

0
source share

All Articles