This is a long standing issue and is present also on 1.2.45.0
I attach a solution with similar WinForms and Wisej projects. Same model files and same forms.
So there’s something not ok with the datagridview databinding.
All the issues are solved. The sample runs flawlessly. I attach it again as I had to fix some grid properties. (I know sometimes I try other people’s samples so maybe others try my samples.)
Thank you for sample!
It seems to be all working with the latest build.
Please notice the difference and changes (attached) due to the different handling of the automatic new row.
With WinForms, using your sample, if you move the focus to the new row and back to a data row, every time the new row gets the focus it adds a new row to the data source , and then removes it when losing the focus. The result is that the automatic key is increased every time. After 10 arrow down and up the Id is 13. If the data source was connected to a database you’d be inserting and deleting rows.
With Wisej it would not be feasible to add/remove the automatic new row (and update the client browser) on the first keystroke and when leaving. Our implementation in my view is a lot more consistent. The automatic new row is blank, when a cell is edited and committed, Wisej adds a real new row with the edited values, and adds a new blank automatic new row.
Another change in your sample that I added just to show the approach, is the change from static to session variable of the data source keeping the static syntax. The modified files are attached.
Best,
Luca
We had a screen sharing feature early on (never made in the beta – you scared me with this) but it was removed. Wisej was able to generate a sharing link (with permission and expiration time) that a user could give out even across the world. The other users could simply click on the link and see exactly the same screen with live updates. Wisej was keeping a list of connected (shared) WebSocket connections and pushing the updates – all the updates! – live, including clicks, resizes, etc… But there were too many issues, like reloading an entire data set in a grid, different screen sizes and browsers window size and so on.
What you have discovered that I didn’t think of, is that when a control is bound to a shared data source it’s the data source that is pushing the updates and therefore Wisej applications can share selected sources without sharing the entire session. Which is indeed cool!
It’s a feature now…
It’s not surprising the data is shared, since it’s a static collection. What I wasn’t expecting is the changes being pushed to the client. This is a desktop like feature.
Suppose I use Wisej to build an ECM or DMS. If I have static collection for incomming items, as soon as someone registers a new item, everyone’s incomming list is updated! Really cool!
OK, so that’s the reason for the sharing of the data source.
Hi Luca,
I’m not using Application.Session. I sent you the latest version by email.
You mean some kind of screen sharing?
I can’t reproduce with the modified sample. The only way I can reproduce something similar is if I revert to the static VendorList._instance, which makes sense since the data source is shared among all sessions. That’s why in the files that I have attached back I changed it to:
private static VendorList _instance { get { return Application.Session.VendorList; } set { Application.Session.VendorList = value; } }
Let me know if this is the case please.
Best,
Luca
This sounds like a feature, but then again, maybe it’s not a feature.
I run the sample on VS and it shows on Chrome. Then I open Firefox, IE and Edge, all running the samples, all on a Window with a DataGridView.
When I edit, add or remove a row on any of these browsers, it shows on the others at once, no need to refresh any browser.