Jump to content

DBGrid Cell Exit


freedowsRoO

Recommended Posts

7 hours ago, Sherzod said:

If I understand you correctly.

Well, when you use calculated fields, it’s better to set this field as not editable.

Sorry i can't managed to do what i want. It's complicated to work with the extJS. Your solution using 'reconfigure' almost work but not 100%, i need to calcule only two fields but the reconfigure not working.

To be more specific i need that when i input 'DISCOUNT' value i need to calcule the '% DISCOUNT' automatic and when i input  "% DISCOUNT" i need to recalcule de "DISCOUNT" value.

Example:

The user input this values:

PRODUCT_VALUE = 1000

CELL 1 "DISCOUNT" = 500

CELL 2 "% DISCOUNT" = 50  ( ok the reconfigure calc this field   (500/1000)*100 )

 

The problem is now, let's supose that the user change de "% DISCOUNT" value manualy to 10:

PRODUCT_VALUE = 1000

CELL 1 "DISCOUNT" = 500 (i need that this value change automatic to 100 = (1000/100 ) * 10)

CELL 2 "% DISCOUNT" = 50 (the user change this value to 10)

 

Link to comment
Share on other sites

20 minutes ago, Sherzod said:

As I understand it, you also want to change the value of the third column, changing the percentage?

Yes, exactly! If the user input a value in the column number 2 (%)  then i need to calc the column 3 (discount) and after that if the user change the value of column 3 (discount) i need to calc the new % on column 2.

ps: Sorry, there is an error on my attach, here is the new one.

GRID CALC.rar

Link to comment
Share on other sites

19 hours ago, Sherzod said:

Sorry for the late reply.

I’m thinking about another possible case.
What if you will change the value of the "VALUE" field, what will happen to fields 2, 3?

Hello, no problem bro. So..   in this example that i sended to you nothing. 

 

But in my aplication i will calculate the value of the "VALUE" field based on quantity * unit price.

The field 2 (%)  calc will be:  ( FIELD 3 /  (quantity * unit price)  )  * 100

The field 3 (DISCOUNT)  calc will be:  ( (quantity * unit price)  / 100 )  *  FIELD 2

Link to comment
Share on other sites

  • 1 year later...

Hi,

4 minutes ago, Stemon63 said:

what's the end of this story?

We all need to do quick and instant calculations in grids. Please explain the most convenient solution (all client only)!

  • Grid enhancements
    • Grids and specifically DBGrids are key components of uniGUI. For many developers grids are the most vital element of the application. For this, we will re-visit grid components, explore and discuss all opportunities to enhance the grid behavior. Including better data-input, native filtering, client-side filtering, infinite scroll and etc.
    • We also have plans to introduce a light-weight version of DBGrid which will allow developers to have more control on the grid. Many of the tasks in existing version of uniGUI DBGrid is fully automated. In the light-weight grid those tasks will be left to developers to handle. Such as posting data to the back-end dataset and etc.

 

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