[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

Quantum Grid: Does not store value if I also place the value in another column

My goal is to use a column to track the max value across a series of columns for each row in a Quantum Grid.  As a value is entered in a cell it will be compared to the value in the "Max" column for the row and, if the new value is greater then it is copied to the Max column

I am trying to use the OnEditValueChanged event handler for the series of data columns but when the new value is greater than the Max and the value is copied to the Max column it no longer appears in the data column to which the value was entered.  If the entered value is <= the Max value the new value appears in the entered column as expected (because nothing is copied to another column).  As you can see from my code I tried loading the column edit value but that didn't work either.

Any help appreciated as I am pushing a deadline.
procedure TfrmMain.gtvShopShCoxxPropertiesEditValueChanged(Sender: TObject);
  if ((Sender as TcxCurrencyEdit).EditValue > gtvShopShMaxPayout.EditValue) and
     (gtvShop.Controller.FocusedColumn.Editing) then
    //gtvShop.Controller.FocusedColumn.EditValue := (Sender as TcxCurrencyEdit).EditValue;
    gtvShopShMaxPayout.EditValue := (Sender as TcxCurrencyEdit).EditValue;

Open in new window

1 Solution
ttheimerAuthor Commented:
I found the problem

I needed the following line before assigning the value to the Max column.

    (Sender as TcxCurrencyEdit).PostEditValue;

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now