Jump to content

Client question: how to update dataset values, changing data on client store


Stemon63

Recommended Posts

Hi Farshad,
I need to perform fast calculations on grid rows. For example, in a DBGrid row, column3 is sum of column1 and column2; And I need to display updated Column3 value immediately, without delay, on every column1 or column2 input changes.
The solution is to perform calc on client store. OK, it works. But HOW I can update then column3 value into dataset (server) on post? There is a client ajax call?


(As I have already tell in another thread, it's time to create a "Clientdataset" for perform fast calculations on grids rows (i don't refer to grid totals) without involve the server for every change or select. Especially on some specific situation (a big supermarket cash register  or when there are a lot of session with great network traffic).
Thanks in advance

Link to comment
Share on other sites

21 hours ago, Stemon63 said:

No solution?

IMHO, unigui is a sever side development. Also your TClientDataset is server side.

The only way to store data in client side is to use local storage technic (10 Mo).

http://forums.unigui.com/index.php?/topic/12306-how-can-i-access-local-storage/&do=findComment&comment=65734

 

But in your case (supermarket dbgrid), storing a column on local storage has more disadvantages than advantages. 

Use instead an UniStringGrid and Send one bloc SQL in a transaction when regestring.

This is what i have done with my old VCL POS application.

Becarefull here : depending on your RDBM the Bloc SQL may have a limitation length string size !

Link to comment
Share on other sites

Hi Abaksoft, thank you.
What I need is a way for perform calculate on ExtJs data store, the same that use Farshad for DBgrids. And it works perfectly. But I need to update the related fields on dataset server, on post record.
On grids with fast and intensive input,  we need some simple calculation (C=A+B) that I don't want perform on server side, with hight latency.
I want to perform and show javascript calculation on client store (and works perfectly) with perfect display in grid. But i need to update that "C" result also on server, or record post.
Other "problem" is that every scroll operation in grid call the server. I can avoid that in code, saving resource. But If I need to display the same data also on other editors outside the grid, I need to call the server. With client operation I hope to display grid data (selected record) also on other editors in form, without call the server.
A "client" or "server" property for manage if data showed (or calculate) must be performed on client or in "standard" server mode.
If I want to manage 50000 sessions I must works on client side, where possible, avoiding continuous "chatting" with server.
Farshad have already  written on new "client's features" in next releases.
Sorry for my English 🙂

Link to comment
Share on other sites

yes, he promised a lighter grid, where we can have more control, but don't expect it to be done before 2023

I've been avoiding using grids as much as possible, on screens that need to input a lot of data, so I've been creating my forms with just tuniscrolbox, and tuniedits
this simulates screen scrolling, and allows more control over each field.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...