Databound DGV not updating - EDITED

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
Answered
0
0

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.

  1. TextBoxBinding form – works all right in WinForms and Wisej
  2. DataGridBinding form
    • on WinForms, when I change the first name or last name, the full name gets updated.
    • on Wisej, when I change the first name or last name, the full name ISN’T updated (is it because it’s read only?)
  3. AllBindings form – EDIT
    • on WinForms, when I edit a field, the datagrid gets updated at once.
    • on Wisej, when I edit a field, the datagrid ISN’T updated.
  4. AllBindings form – REMOVE
    • on WinForms, when I delete a register, that row disappears from the datagrid at once.
    • on Wisej, when I delete a register, that row DOESN’T disappear from the datagrid.
  5. AllBindings form – NEW – works all right in WinForms and Wisej.

So there’s something not ok with the datagridview databinding.

Attachment
  • You must to post comments
Best Answer
0
0

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.)

Attachment
  • You must to post comments
Great Answer
0
0

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

 

Attachment
  • You must to post comments
1
0

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…

 

  • You must to post comments
1
0

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!

  • Luca (ITG)
    I shared this feature internally and another use already came up, which is to save memory and share common lookup sources. With proper thread locking, the first use would populate the data source and all the others will receive the pushed updated lookup list.
  • You must to post comments
0
0

OK, so that’s the reason for the sharing of the data source.

  • You must to post comments
0
0

Hi Luca,

I’m not using Application.Session. I sent you the latest version by email.

  • You must to post comments
0
0

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

 

  • You must to post comments
1
0

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.

 

  • You must to post comments
Showing 8 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json