Hi!
I’m struggeling with a unwanted “feature” where PictureBoxes dissapear when using my application. There are 5 PictureBoxes with their visible property bound to a boolean value in the dataset.
The DataRepeaters are on a TabControl and this seems to happen when I change the active tab and stay on the other page a while. After disposing/closing the other tab and return to the first with the DataRepeater the pictureboxes are gone. If I scroll trough the DataSet tho, some rows will show the PictureBoxes (I think after the prefetch count, I dont know).
Using version 2.5.35
Attached two screenshots on with the pictureboxes and one without (the bug)
This is the code I use for the DataBinding
PictureBox_Gevaar.DataBindings.Add(New Wisej.Web.Binding(“Visible”, dataSet.Tables(0), “IsGevaarlijkeEnergie”, True))
PictureBox_Mobiele.DataBindings.Add(New Wisej.Web.Binding(“Visible”, dataSet.Tables(0), “IsMobieleApparatuur”, True))
PictureBox_Geheven.DataBindings.Add(New Wisej.Web.Binding(“Visible”, dataSet.Tables(0), “IsGehevenLasten”, True))
PictureBox_CSE.DataBindings.Add(New Wisej.Web.Binding(“Visible”, dataSet.Tables(0), “IsCSE”, True))
PictureBox_HW.DataBindings.Add(New Wisej.Web.Binding(“Visible”, dataSet.Tables(0), “IsHW”, True))
Thanks
Vincent
Hi Vincent,
So the issue is that you’re binding the visible property using bidirectional binding, so when the tab hides the bound controls the changing of the visibility property updates the DataSource, and actually that’s correct.
So what you’ll need to do is to use monodirectional binding like this :
PictureBox_HW.DataBindings.Add(New Wisej.Web.Binding("Visible", DS, "IsHW", True, DataSourceUpdateMode.Never))
But we found a bug related to that and it should be fixed in the next build.
Fortunately, there’s a couple of workarounds for it, what you can do is :
I have modified your sample slightly just to showcase the temporary fix.
HTH,
Alaa
Hi, I’ve added a sample project.
Steps to reproduce the issue:
Hi Vincent,
Can you please check if you have any errors in your browser’s console ?
Also, it would be better if you can put together a small sample for us to try and reproduce.
Best,
Alaa
Please login first to submit.